GDCM
2.2.4
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MessageExchangeDefinition
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
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
};
47
65
class
GDCM_EXPORT
BaseRootQuery
:
public
Object
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
:
70
QueryPatient
mPatient
;
71
QueryStudy
mStudy
;
72
QuerySeries
mSeries
;
73
QueryImage
mImage
;
74
75
DataSet
mDataSet
;
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
Generated on Sat Jul 27 2013 09:03:35 for GDCM by
1.8.4