GDCM 3.2.1

gdcmBaseRootQuery.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef GDCMBASEROOTQUERY_H
19#define GDCMBASEROOTQUERY_H
20
21#include "gdcmDataSet.h"
22#include "gdcmUIDs.h"
23#include "gdcmBaseQuery.h"
24#include "gdcmQueryPatient.h"
25#include "gdcmQueryStudy.h"
26#include "gdcmQuerySeries.h"
27#include "gdcmQueryImage.h"
28
29 namespace gdcm
30{
31 class QueryFactory;
32 class DictEntry;
33
34 enum EQueryLevel
35 {
36 // -1 is reserved do not use
37 ePatient = 0,
38 eStudy = 1,
39 eSeries = 2,
40 eImage = 3
41 };
42 enum EQueryType
43 {
44 eFind= 0,
45 eMove,
46 eWLMFind
47 };
48
66 class GDCM_EXPORT BaseRootQuery : public BaseQuery
67{
68 //these four classes contain the required, unique, and optional tags from the standard.
69 //used both to list the tags as well as to validate a dataset, if ever we were to do so.
70 protected:
71 QueryPatient mPatient;
72 QueryStudy mStudy;
73 QuerySeries mSeries;
74 QueryImage mImage;
75
76 friend class QueryFactory;
77 BaseRootQuery();
78
79 ERootType mRootType; //set in construction, and it's something else in the study root type
80 std::string mHelpDescription; //used when generating the help output
81
82 public:
83 ~BaseRootQuery() override = default;
84
88 virtual std::vector<Tag> GetTagListByLevel(const EQueryLevel& inQueryLevel) = 0;
89
93 virtual void InitializeDataSet(const EQueryLevel& inQueryLevel) = 0;
94
108 bool ValidateQuery( bool inStrict = true ) const override = 0;
109
110 static const char *GetQueryLevelString( EQueryLevel ql );
111 static int GetQueryLevelFromString( const char * str );
112
113 static QueryBase * Construct(ERootType inRootType, EQueryLevel qlevel);
114 EQueryLevel GetQueryLevelFromQueryRoot( ERootType roottype );
115};
116
117} // end namespace gdcm
118
119#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