ITK  5.2.0
Insight Toolkit
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  * 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 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 <vector>
26 
27 namespace itk
28 {
52 class ITKIODCMTK_EXPORT DCMTKSeriesFileNames : public ProcessObject
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(DCMTKSeriesFileNames);
56 
61 
63  using SeriesUIDContainerType = std::vector<std::string>;
64 
67 
69  using FileNamesContainerType = std::vector<std::string>;
70 
73 
75  itkNewMacro(Self);
76 
78  itkTypeMacro(DCMTKSeriesFileNames, ProcessObject);
79 
80  /* -------- Define the API for DCMTKSeriesFileNames ----------- */
81 
83  void
84  SetInputDirectory(const char * name);
85 
87  void
88  SetInputDirectory(std::string const & name);
89 
91  void
92  SetDirectory(std::string const & name)
93  {
94  SetInputDirectory(name);
95  }
96 
100  const FileNamesContainerType &
101  GetInputFileNames();
102 
104  void
105  SetOutputDirectory(std::string const & name)
106  {
107  m_OutputDirectory = name;
108  this->Modified();
109  }
111 
117  const FileNamesContainerType &
118  GetOutputFileNames();
119 
126  const FileNamesContainerType &
127  GetFileNames(const std::string serie);
128 
134  const SeriesUIDContainerType &
135  GetSeriesUIDs();
136 
138  itkSetMacro(Recursive, bool);
139  itkGetConstMacro(Recursive, bool);
140  itkBooleanMacro(Recursive);
142 
147  void
148  SetUseSeriesDetails(bool useSeriesDetails);
149 
154  bool
156  {
157  return m_UseSeriesDetails;
158  }
159 
166  void
167  AddSeriesRestriction(const std::string & /* tag */)
168  {
169  // m_SerieHelper->AddRestriction(tag);
170  }
171 
176  itkSetMacro(LoadSequences, bool);
177  itkGetConstMacro(LoadSequences, bool);
178  itkBooleanMacro(LoadSequences);
180 
185  itkSetMacro(LoadPrivateTags, bool);
186  itkGetConstMacro(LoadPrivateTags, bool);
187  itkBooleanMacro(LoadPrivateTags);
189 
190 protected:
192  ~DCMTKSeriesFileNames() override;
193  void
194  PrintSelf(std::ostream & os, Indent indent) const override;
195 
196 private:
198  void
199  GetDicomData(const std::string & series, bool saveFileNames);
200 
202  std::string m_InputDirectory;
203 
205  std::string m_OutputDirectory;
206 
210 
215 
220 };
221 } // namespace itk
222 
223 #endif // itkDCMTKSeriesFileNames_h
itkObjectFactory.h
itk::DCMTKSeriesFileNames::SetOutputDirectory
void SetOutputDirectory(std::string const &name)
Definition: itkDCMTKSeriesFileNames.h:105
itk::DCMTKSeriesFileNames::SeriesUIDContainer
SeriesUIDContainerType SeriesUIDContainer
Definition: itkDCMTKSeriesFileNames.h:66
itk::DCMTKSeriesFileNames::AddSeriesRestriction
void AddSeriesRestriction(const std::string &)
Definition: itkDCMTKSeriesFileNames.h:167
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::DCMTKSeriesFileNames::m_OutputFileNames
FileNamesContainerType m_OutputFileNames
Definition: itkDCMTKSeriesFileNames.h:209
itk::DCMTKSeriesFileNames::m_LoadPrivateTags
bool m_LoadPrivateTags
Definition: itkDCMTKSeriesFileNames.h:219
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::DCMTKSeriesFileNames::m_InputDirectory
std::string m_InputDirectory
Definition: itkDCMTKSeriesFileNames.h:202
itkMacro.h
itk::DCMTKSeriesFileNames::m_Recursive
bool m_Recursive
Definition: itkDCMTKSeriesFileNames.h:217
itkProcessObject.h
itk::DCMTKSeriesFileNames::FilenamesContainer
FileNamesContainerType FilenamesContainer
Definition: itkDCMTKSeriesFileNames.h:72
itk::DCMTKSeriesFileNames::SeriesUIDContainerType
std::vector< std::string > SeriesUIDContainerType
Definition: itkDCMTKSeriesFileNames.h:63
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::DCMTKSeriesFileNames::m_InputFileNames
FileNamesContainerType m_InputFileNames
Definition: itkDCMTKSeriesFileNames.h:208
itk::DCMTKSeriesFileNames::SetDirectory
void SetDirectory(std::string const &name)
Definition: itkDCMTKSeriesFileNames.h:92
itk::DCMTKSeriesFileNames::m_SeriesUIDs
SeriesUIDContainerType m_SeriesUIDs
Definition: itkDCMTKSeriesFileNames.h:214
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::DCMTKSeriesFileNames::GetUseSeriesDetails
bool GetUseSeriesDetails() const
Definition: itkDCMTKSeriesFileNames.h:155
itk::DCMTKSeriesFileNames::m_UseSeriesDetails
bool m_UseSeriesDetails
Definition: itkDCMTKSeriesFileNames.h:216
itk::DCMTKSeriesFileNames
Generate a sequence of filenames from a DICOM series.
Definition: itkDCMTKSeriesFileNames.h:52
itk::DCMTKSeriesFileNames::m_OutputDirectory
std::string m_OutputDirectory
Definition: itkDCMTKSeriesFileNames.h:205
itk::DCMTKSeriesFileNames::m_LoadSequences
bool m_LoadSequences
Definition: itkDCMTKSeriesFileNames.h:218
itk::DCMTKSeriesFileNames::FileNamesContainerType
std::vector< std::string > FileNamesContainerType
Definition: itkDCMTKSeriesFileNames.h:69