ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDCMTKSeriesFileNames.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 itkDCMTKSeriesFileNames_h
19#define itkDCMTKSeriesFileNames_h
20#include "ITKIODCMTKExport.h"
21
22#include "itkProcessObject.h"
23#include "itkObjectFactory.h"
24#include "itkMacro.h"
25#include <map>
26#include <utility>
27#include <vector>
28
29namespace itk
30{
31class DCMTKFileReader;
55class ITKIODCMTK_EXPORT DCMTKSeriesFileNames : public ProcessObject
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(DCMTKSeriesFileNames);
59
64
66 using SeriesUIDContainerType = std::vector<std::string>;
69
71 using FileNamesContainerType = std::vector<std::string>;
74
76 itkNewMacro(Self);
77
79 itkOverrideGetNameOfClassMacro(DCMTKSeriesFileNames);
80
81 /* -------- Define the API for DCMTKSeriesFileNames ----------- */
82
84 void
85 SetInputDirectory(const char * name);
86
88 void
89 SetInputDirectory(const std::string & name);
90
92 void
93 SetDirectory(const std::string & name)
94 {
96 }
97
101 const FileNamesContainerType &
103
105 void
106 SetOutputDirectory(const std::string & name)
107 {
108 m_OutputDirectory = name;
109 this->Modified();
110 }
111
117 const FileNamesContainerType &
119
127 GetFileNames(const std::string serie);
128
136
138 itkSetMacro(Recursive, bool);
139 itkGetConstMacro(Recursive, bool);
140 itkBooleanMacro(Recursive);
141
146 void
147 SetUseSeriesDetails(bool useSeriesDetails);
148
153 bool
155 {
156 return m_UseSeriesDetails;
157 }
158
165 void
166 AddSeriesRestriction(const std::string & tag);
167
172 itkSetMacro(LoadSequences, bool);
173 itkGetConstMacro(LoadSequences, bool);
174 itkBooleanMacro(LoadSequences);
175
180 itkSetMacro(LoadPrivateTags, bool);
181 itkGetConstMacro(LoadPrivateTags, bool);
182 itkBooleanMacro(LoadPrivateTags);
183
184protected:
187 void
188 PrintSelf(std::ostream & os, Indent indent) const override;
189
190private:
192 void
194
196 std::string
197 CreateSeriesIdentifier(DCMTKFileReader * reader) const;
198
200 std::string m_InputDirectory{};
201
203 std::string m_OutputDirectory{};
204
208
210 std::map<std::string, FileNamesContainerType> m_SeriesFiles{};
211
214 std::vector<std::pair<unsigned short, unsigned short>> m_Restrictions{};
215
218
222
227};
228} // namespace itk
229
230#endif // itkDCMTKSeriesFileNames_h
std::vector< std::string > SeriesUIDContainerType
SeriesUIDContainerType m_SeriesUIDs
void SetInputDirectory(const char *name)
const FileNamesContainerType & GetOutputFileNames()
void SetInputDirectory(const std::string &name)
void PrintSelf(std::ostream &os, Indent indent) const override
std::map< std::string, FileNamesContainerType > m_SeriesFiles
void AddSeriesRestriction(const std::string &tag)
FileNamesContainerType m_OutputFileNames
SeriesUIDContainerType SeriesUIDContainer
const FileNamesContainerType & GetInputFileNames()
const FileNamesContainerType & GetFileNames(const std::string serie)
~DCMTKSeriesFileNames() override
const SeriesUIDContainerType & GetSeriesUIDs()
void SetUseSeriesDetails(bool useSeriesDetails)
void SetOutputDirectory(const std::string &name)
FileNamesContainerType m_InputFileNames
std::string CreateSeriesIdentifier(DCMTKFileReader *reader) const
void SetDirectory(const std::string &name)
std::vector< std::string > FileNamesContainerType
std::vector< std::pair< unsigned short, unsigned short > > m_Restrictions
FileNamesContainerType FilenamesContainer
Control indentation during Print() invocation.
Definition itkIndent.h:53
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....
#define itkSetMacro(name, type)