GDCM  2.2.1
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 "gdcmQueryPatient.h"
22 #include "gdcmQueryStudy.h"
23 #include "gdcmQuerySeries.h"
24 #include "gdcmQueryImage.h"
25 #include "gdcmDataSet.h"
26 #include "gdcmDictEntry.h"
27 #include "gdcmTag.h"
28 #include "gdcmUIDs.h"
29 #include "gdcmObject.h"
30 
31 #include <iostream>
32 
33 namespace gdcm{
34  class QueryFactory;
35 
37  {
42  };
44  {
47  };
48 
65  {
66  //these four classes contain the required, unique, and optional tags from the standard.
67  //used both to list the tags as well as to validate a dataset, if ever we were to do so.
68 
69  protected:
70 
72  friend class QueryFactory;
73  BaseRootQuery();
74 
79 
80  ERootType mRootType; //set in construction, and it's something else in the study root type
81  std::string mHelpDescription; //used when generating the help output
82 
83  void SetSearchParameter(const Tag& inTag, const DictEntry& inDictEntry, const std::string& inValue);
84  public:
85  virtual ~BaseRootQuery();
86 
87  void SetSearchParameter(const Tag& inTag, const std::string& inValue);
88  void SetSearchParameter(const std::string& inKeyword, const std::string& inValue);
89 
90  virtual const std::ostream &WriteHelpFile(std::ostream &os);
91 
92  //this function allows writing of the query to disk for storing for future use
93  //virtual in case it needs to be overiden
94  //returns false if the operation failed
95  virtual bool WriteQuery(const std::string& inFileName);
96 
98  DataSet const & GetQueryDataSet() const;
99  DataSet & GetQueryDataSet();
100  void AddQueryDataSet(const DataSet & ds);
101 
105  virtual std::vector<Tag> GetTagListByLevel(const EQueryLevel& inQueryLevel) = 0;
106 
110  virtual void InitializeDataSet(const EQueryLevel& inQueryLevel) = 0;
111 
125  virtual bool ValidateQuery(bool inStrict = true) const = 0;
126 
127  virtual UIDs::TSName GetAbstractSyntaxUID() const = 0;
128  };
129 }
130 
131 
132 #endif //GDCMBASEROOTQUERY_H

Generated on Mon Feb 18 2013 18:42:58 for GDCM by doxygen 1.8.3.1
SourceForge.net Logo