GDCM
2.2.0
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 "
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
52
enum
EQueryLevel
53
{
54
ePatient
,
55
eStudy
,
56
eSeries
,
57
eImageOrFrame
58
};
59
enum
EQueryType
60
{
61
eFind
,
62
eMove
63
};
64
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
70
protected
:
71
72
DataSet
mDataSet
;
73
friend
class
QueryFactory
;
74
BaseRootQuery
();
75
76
QueryPatient
mPatient
;
77
QueryStudy
mStudy
;
78
QuerySeries
mSeries
;
79
QueryImage
mImage
;
80
81
ERootType
mRootType
;
//set in construction, and it's something else in the study root type
82
std::string
mHelpDescription
;
//used when generating the help output
83
84
void
SetSearchParameter(
const
Tag
& inTag,
const
DictEntry
& inDictEntry,
const
std::string& inValue);
85
public
:
86
virtual
~
BaseRootQuery
();
87
88
void
SetSearchParameter(
const
Tag
& inTag,
const
std::string& inValue);
89
void
SetSearchParameter(
const
std::string& inKeyword,
const
std::string& inValue);
90
91
virtual
const
std::ostream &WriteHelpFile(std::ostream &os);
92
93
//this function allows writing of the query to disk for storing for future use
94
//virtual in case it needs to be overiden
95
//returns false if the operation failed
96
virtual
bool
WriteQuery(
const
std::string& inFileName);
97
99
DataSet
const
& GetQueryDataSet()
const
;
100
DataSet
& GetQueryDataSet();
101
void
AddQueryDataSet(
const
DataSet
& ds);
102
106
virtual
std::vector<Tag> GetTagListByLevel(
const
EQueryLevel
& inQueryLevel) = 0;
107
111
virtual
void
InitializeDataSet(
const
EQueryLevel
& inQueryLevel) = 0;
112
126
virtual
bool
ValidateQuery(
bool
inStrict =
true
)
const
= 0;
127
128
virtual
UIDs::TSName
GetAbstractSyntaxUID()
const
= 0;
129
};
130
}
131
132
133
#endif //GDCMBASEROOTQUERY_H
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1