ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGDCMSeriesFileNames.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 * https://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 itkGDCMSeriesFileNames_h
19#define itkGDCMSeriesFileNames_h
20
21#include "itkProcessObject.h"
22#include "itkObjectFactory.h"
23#include "itkMacro.h"
24#include <map>
25#include <utility>
26#include <vector>
27#include "ITKIOGDCMExport.h"
28
29namespace itk
30{
56
58using FilenamesContainer = std::vector<std::string>;
59using SerieUIDContainer = std::vector<std::string>;
60
61class ITKIOGDCM_EXPORT GDCMSeriesFileNames : public ProcessObject
62{
63public:
64 ITK_DISALLOW_COPY_AND_MOVE(GDCMSeriesFileNames);
65
70
73
76
78 itkNewMacro(Self);
79
81 itkOverrideGetNameOfClassMacro(GDCMSeriesFileNames);
82
83 /* -------- Define the API for GDCMSeriesFileNames ----------- */
84
86 void
87 SetInputDirectory(const char * name);
88
90 void
91 SetInputDirectory(const std::string & name);
92
94 void
95 SetDirectory(const std::string & name)
96 {
98 }
99
103 const FileNamesContainerType &
105
107 void
108 SetOutputDirectory(const std::string & name)
109 {
110 m_OutputDirectory = name;
111 this->Modified();
112 }
113
119 const FileNamesContainerType &
121
129 GetFileNames(const std::string serie);
130
138
142 itkSetMacro(Recursive, bool);
143 itkGetConstMacro(Recursive, bool);
144 itkBooleanMacro(Recursive);
146
153 void
154 SetUseSeriesDetails(bool useSeriesDetails);
155
160 bool
162 {
163 return m_UseSeriesDetails;
164 }
165
173 void
174 AddSeriesRestriction(const std::string & tag);
175
183 itkSetMacro(FailOnAmbiguousOrdering, bool);
184 itkGetConstMacro(FailOnAmbiguousOrdering, bool);
185 itkBooleanMacro(FailOnAmbiguousOrdering);
187
190 itkGetConstMacro(DidUseAmbiguousOrdering, bool);
192
198 itkSetMacro(LoadSequences, bool);
199 itkGetConstMacro(LoadSequences, bool);
200 itkBooleanMacro(LoadSequences);
202
208 itkSetMacro(LoadPrivateTags, bool);
209 itkGetConstMacro(LoadPrivateTags, bool);
210 itkBooleanMacro(LoadPrivateTags);
212protected:
215 void
216 PrintSelf(std::ostream & os, Indent indent) const override;
217
218private:
220 std::string m_InputDirectory = "";
221
223 std::string m_OutputDirectory = "";
224
228
230 void
232
235 {
237 bool Ordered{ false };
238 };
239
242 void
244
246 std::map<std::string, SeriesEntry> m_SeriesFiles{};
247
249 std::map<std::string, std::string> m_InstanceNumbers{};
250
254 std::vector<std::pair<unsigned short, unsigned short>> m_UserRefineTags{};
255
259
262
263 bool m_UseSeriesDetails = false;
266 bool m_Recursive = false;
267 bool m_LoadSequences = false;
268 bool m_LoadPrivateTags = false;
269};
270} // namespace itk
271
272#endif // itkGDCMSeriesFileNames_h
void PrintSelf(std::ostream &os, Indent indent) const override
FileNamesContainerType m_OutputFileNames
std::map< std::string, SeriesEntry > m_SeriesFiles
const FileNamesContainerType & GetOutputFileNames()
void SetInputDirectory(const std::string &name)
FilenamesContainer FileNamesContainerType
void AddSeriesRestriction(const std::string &tag)
FileNamesContainerType m_InputFileNames
std::vector< std::pair< unsigned short, unsigned short > > m_UserRefineTags
void SetDirectory(const std::string &name)
void SetInputDirectory(const char *name)
void SetUseSeriesDetails(bool useSeriesDetails)
const SeriesUIDContainerType & GetSeriesUIDs()
SerieUIDContainer SeriesUIDContainerType
~GDCMSeriesFileNames() override
const FileNamesContainerType & GetFileNames(const std::string serie)
const FileNamesContainerType & GetInputFileNames()
void SetOutputDirectory(const std::string &name)
SeriesUIDContainerType m_SeriesUIDs
std::map< std::string, std::string > m_InstanceNumbers
void OrderSeries(SeriesEntry &entry)
Control indentation during Print() invocation.
Definition itkIndent.h:51
virtual void Modified() const
Implements transparent reference counting.
Generate a unique, increasing time value.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
std::vector< std::string > SerieUIDContainer
std::vector< std::string > FilenamesContainer