GDCM  2.4.5
gdcmBaseRootQuery.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 "gdcmObject.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 
35  {
36  // -1 is reserved do not use
37  ePatient = 0,
38  eStudy = 1,
39  eSeries = 2,
40  eImage = 3
41  };
43  {
44  eFind = 0,
46  };
47 
66 {
67  //these four classes contain the required, unique, and optional tags from the standard.
68  //used both to list the tags as well as to validate a dataset, if ever we were to do so.
69 protected:
74 
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  void SetSearchParameter(const Tag& inTag, const DictEntry& inDictEntry, const std::string& inValue);
83 public:
84  virtual ~BaseRootQuery();
85 
86  void SetSearchParameter(const Tag& inTag, const std::string& inValue);
87  void SetSearchParameter(const std::string& inKeyword, const std::string& inValue);
88 
89  const std::ostream &WriteHelpFile(std::ostream &os);
90 
91  //this function allows writing of the query to disk for storing for future use
92  //virtual in case it needs to be overiden
93  //returns false if the operation failed
94  bool WriteQuery(const std::string& inFileName);
95 
97  DataSet const & GetQueryDataSet() const;
98  DataSet & GetQueryDataSet();
99  void AddQueryDataSet(const DataSet & ds);
100 
104  virtual std::vector<Tag> GetTagListByLevel(const EQueryLevel& inQueryLevel) = 0;
105 
109  virtual void InitializeDataSet(const EQueryLevel& inQueryLevel) = 0;
110 
124  virtual bool ValidateQuery(bool inStrict = true) const = 0;
125 
126  virtual UIDs::TSName GetAbstractSyntaxUID() const = 0;
127 
128  void Print(std::ostream &os) const;
129 
130  static const char *GetQueryLevelString( EQueryLevel ql );
131  static int GetQueryLevelFromString( const char * str );
132 
133  static QueryBase * Construct(ERootType inRootType, EQueryLevel qlevel);
134  EQueryLevel GetQueryLevelFromQueryRoot( ERootType roottype );
135 };
136 
137 } // end namespace gdcm
138 
139 #endif //GDCMBASEROOTQUERY_H
BaseRootQuery contains: a baseclass which will produce a dataset for c-find and c-move with patient/s...
Definition: gdcmBaseRootQuery.h:65
ERootType mRootType
Definition: gdcmBaseRootQuery.h:79
Class to represent a Data Set (which contains Data Elements) A Data Set represents an instance of a r...
Definition: gdcmDataSet.h:55
Definition: gdcmBaseRootQuery.h:39
Definition: gdcmBaseRootQuery.h:40
Definition: gdcmBaseRootQuery.h:45
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
QueryFactory.h.
Definition: gdcmQueryFactory.h:58
Definition: gdcmBaseRootQuery.h:38
Definition: gdcmBaseRootQuery.h:37
Object.
Definition: gdcmObject.h:36
EQueryType
Definition: gdcmBaseRootQuery.h:42
Definition: gdcmBaseRootQuery.h:44
TSName
Definition: gdcmUIDs.h:340
QueryStudy.h contains: class to construct a study-based query for C-FIND and C-MOVE.
Definition: gdcmQueryStudy.h:29
Class to represent an Entry in the Dict Does not really exist within the DICOM definition, just a way to minimize storage and have a mapping from gdcm::Tag to the needed information.
Definition: gdcmDictEntry.h:36
QueryImage contains: class to construct an image-based query for C-FIND and C-MOVE.
Definition: gdcmQueryImage.h:30
QueryImage mImage
Definition: gdcmBaseRootQuery.h:73
QueryPatient mPatient
Definition: gdcmBaseRootQuery.h:70
QueryStudy mStudy
Definition: gdcmBaseRootQuery.h:71
QueryBase contains: the base class for constructing a query dataset for a C-FIND and a C-MOVE...
Definition: gdcmQueryBase.h:60
std::string mHelpDescription
Definition: gdcmBaseRootQuery.h:80
QuerySeries contains: class to construct a series-based query for c-find and c-move.
Definition: gdcmQuerySeries.h:29
QuerySeries mSeries
Definition: gdcmBaseRootQuery.h:72
ERootType
Definition: gdcmQueryBase.h:28
DataSet mDataSet
Definition: gdcmBaseRootQuery.h:75
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element). Basically an uint32_t which...
Definition: gdcmTag.h:38
EQueryLevel
Definition: gdcmBaseRootQuery.h:34
Definition: gdcmASN1.h:20
QueryPatient contains: class to construct a patient-based query for c-find and c-move.
Definition: gdcmQueryPatient.h:29

Generated on Fri Sep 25 2015 17:58:22 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo