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 <vector>
25#include "ITKIOGDCMExport.h"
26
27// forward declaration, to remove compile dependency on GDCM library
28namespace gdcm
29{
30class SerieHelper;
31}
32
33namespace itk
34{
58
60using FilenamesContainer = std::vector<std::string>;
61using SerieUIDContainer = std::vector<std::string>;
62
63class ITKIOGDCM_EXPORT GDCMSeriesFileNames : public ProcessObject
64{
65public:
66 ITK_DISALLOW_COPY_AND_MOVE(GDCMSeriesFileNames);
67
72
75
78
80 itkNewMacro(Self);
81
83 itkOverrideGetNameOfClassMacro(GDCMSeriesFileNames);
84
85 /* -------- Define the API for GDCMSeriesFileNames ----------- */
86
88 void
89 SetInputDirectory(const char * name);
90
92 void
93 SetInputDirectory(const std::string & name);
94
96 void
97 SetDirectory(const std::string & name)
98 {
100 }
101
105 const FileNamesContainerType &
107
109 void
110 SetOutputDirectory(const std::string & name)
111 {
112 m_OutputDirectory = name;
113 this->Modified();
114 }
115
116
122 const FileNamesContainerType &
124
132 GetFileNames(const std::string serie);
133
141
144 itkSetMacro(Recursive, bool);
145 itkGetConstMacro(Recursive, bool);
146 itkBooleanMacro(Recursive);
148
153 void
154 SetUseSeriesDetails(bool useSeriesDetails);
155
160 bool
162 {
163 return m_UseSeriesDetails;
164 }
165
172 void
173 AddSeriesRestriction(const std::string & tag);
174
179 itkSetMacro(LoadSequences, bool);
180 itkGetConstMacro(LoadSequences, bool);
181 itkBooleanMacro(LoadSequences);
183
188 itkSetMacro(LoadPrivateTags, bool);
189 itkGetConstMacro(LoadPrivateTags, bool);
190 itkBooleanMacro(LoadPrivateTags);
192
193protected:
196 void
197 PrintSelf(std::ostream & os, Indent indent) const override;
198
199private:
201 std::string m_InputDirectory = "";
202
204 std::string m_OutputDirectory = "";
205
209
211 std::unique_ptr<gdcm::SerieHelper> m_SerieHelper;
212
215
217 bool m_Recursive = false;
218 bool m_LoadSequences = false;
219 bool m_LoadPrivateTags = false;
220};
221} // namespace itk
222
223#endif // itkGDCMSeriesFileNames_h
void PrintSelf(std::ostream &os, Indent indent) const override
std::unique_ptr< gdcm::SerieHelper > m_SerieHelper
FileNamesContainerType m_OutputFileNames
const FileNamesContainerType & GetOutputFileNames()
void SetInputDirectory(const std::string &name)
FilenamesContainer FileNamesContainerType
void AddSeriesRestriction(const std::string &tag)
FileNamesContainerType m_InputFileNames
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
Control indentation during Print() invocation.
Definition itkIndent.h:50
virtual void Modified() const
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
std::vector< std::string > SerieUIDContainer
std::vector< std::string > FilenamesContainer