gdcmBaseRootQuery.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef GDCMBASEROOTQUERY_H
#define GDCMBASEROOTQUERY_H
#include "gdcmDataSet.h"
#include "gdcmUIDs.h"
#include "gdcmBaseQuery.h"
#include "gdcmQueryPatient.h"
#include "gdcmQueryStudy.h"
#include "gdcmQuerySeries.h"
#include "gdcmQueryImage.h"
namespace gdcm
{
class QueryFactory;
class DictEntry;
enum EQueryLevel
{
// -1 is reserved do not use
ePatient = 0,
eStudy = 1,
eSeries = 2,
eImage = 3
};
enum EQueryType
{
eFind= 0,
eMove,
eWLMFind
};
class GDCM_EXPORT BaseRootQuery : public BaseQuery
{
//these four classes contain the required, unique, and optional tags from the standard.
//used both to list the tags as well as to validate a dataset, if ever we were to do so.
protected:
QueryPatient mPatient;
QueryStudy mStudy;
QuerySeries mSeries;
QueryImage mImage;
friend class QueryFactory;
BaseRootQuery();
ERootType mRootType; //set in construction, and it's something else in the study root type
std::string mHelpDescription; //used when generating the help output
public:
~BaseRootQuery() override = default;
virtual std::vector<Tag> GetTagListByLevel(const EQueryLevel& inQueryLevel) = 0;
virtual void InitializeDataSet(const EQueryLevel& inQueryLevel) = 0;
bool ValidateQuery( bool inStrict = true ) const override = 0;
static const char *GetQueryLevelString( EQueryLevel ql );
static int GetQueryLevelFromString( const char * str );
static QueryBase * Construct(ERootType inRootType, EQueryLevel qlevel);
EQueryLevel GetQueryLevelFromQueryRoot( ERootType roottype );
};
} // end namespace gdcm
#endif //GDCMBASEROOTQUERY_H
gdcm::BaseQuery::BaseQuery
BaseQuery()
gdcm::BaseRootQuery::mRootType
ERootType mRootType
Definition gdcmBaseRootQuery.h:79
gdcm::BaseRootQuery::mImage
QueryImage mImage
Definition gdcmBaseRootQuery.h:74
gdcm::BaseRootQuery::QueryFactory
friend class QueryFactory
Definition gdcmBaseRootQuery.h:76
gdcm::BaseRootQuery::GetTagListByLevel
virtual std::vector< Tag > GetTagListByLevel(const EQueryLevel &inQueryLevel)=0
gdcm::BaseRootQuery::Construct
static QueryBase * Construct(ERootType inRootType, EQueryLevel qlevel)
gdcm::BaseRootQuery::mStudy
QueryStudy mStudy
Definition gdcmBaseRootQuery.h:72
gdcm::BaseRootQuery::mSeries
QuerySeries mSeries
Definition gdcmBaseRootQuery.h:73
gdcm::BaseRootQuery::~BaseRootQuery
~BaseRootQuery() override=default
gdcm::BaseRootQuery::mHelpDescription
std::string mHelpDescription
Definition gdcmBaseRootQuery.h:80
gdcm::BaseRootQuery::InitializeDataSet
virtual void InitializeDataSet(const EQueryLevel &inQueryLevel)=0
gdcm::BaseRootQuery::GetQueryLevelFromQueryRoot
EQueryLevel GetQueryLevelFromQueryRoot(ERootType roottype)
gdcm::BaseRootQuery::mPatient
QueryPatient mPatient
Definition gdcmBaseRootQuery.h:71
gdcm::BaseRootQuery::BaseRootQuery
BaseRootQuery()
gdcm::BaseRootQuery::GetQueryLevelString
static const char * GetQueryLevelString(EQueryLevel ql)
gdcm::BaseRootQuery::GetQueryLevelFromString
static int GetQueryLevelFromString(const char *str)
gdcm::BaseRootQuery::ValidateQuery
bool ValidateQuery(bool inStrict=true) const override=0
gdcm::DictEntry
Class to represent an Entry in the Dict.
Definition gdcmDictEntry.h:37
gdcm::QueryBase
QueryBase.
Definition gdcmQueryBase.h:61
gdcm::QueryFactory
QueryFactory.h.
Definition gdcmQueryFactory.h:58
gdcm::QueryImage
QueryImage.
Definition gdcmQueryImage.h:31
gdcm::QueryPatient
QueryPatient.
Definition gdcmQueryPatient.h:30
gdcm::QuerySeries
QuerySeries.
Definition gdcmQuerySeries.h:30
gdcm::QueryStudy
QueryStudy.h.
Definition gdcmQueryStudy.h:30
gdcmBaseQuery.h
gdcmDataSet.h
gdcmQueryImage.h
gdcmQueryPatient.h
gdcmQuerySeries.h
gdcmQueryStudy.h
gdcmUIDs.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::ERootType
ERootType
Definition gdcmQueryBase.h:29
gdcm::EQueryType
EQueryType
Definition gdcmBaseRootQuery.h:43
gdcm::eFind
@ eFind
Definition gdcmBaseRootQuery.h:44
gdcm::eMove
@ eMove
Definition gdcmBaseRootQuery.h:45
gdcm::eWLMFind
@ eWLMFind
Definition gdcmBaseRootQuery.h:46
gdcm::EQueryLevel
EQueryLevel
Definition gdcmBaseRootQuery.h:35
gdcm::eImage
@ eImage
Definition gdcmBaseRootQuery.h:40
gdcm::ePatient
@ ePatient
Definition gdcmBaseRootQuery.h:37
gdcm::eSeries
@ eSeries
Definition gdcmBaseRootQuery.h:39
gdcm::eStudy
@ eStudy
Definition gdcmBaseRootQuery.h:38