ITK  6.0.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  * 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 <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  itkOverrideGetNameOfClassMacro(DCMTKSeriesFileNames);
79 
80  /* -------- Define the API for DCMTKSeriesFileNames ----------- */
81 
83  void
84  SetInputDirectory(const char * name);
85 
87  void
88  SetInputDirectory(const std::string & name);
89 
91  void
92  SetDirectory(const std::string & name)
93  {
94  SetInputDirectory(name);
95  }
96 
100  const FileNamesContainerType &
101  GetInputFileNames();
102 
104  void
105  SetOutputDirectory(const std::string & name)
106  {
107  m_OutputDirectory = name;
108  this->Modified();
109  }
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);
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_SeriesHelper->AddRestriction(tag);
170  }
171 
176  itkSetMacro(LoadSequences, bool);
177  itkGetConstMacro(LoadSequences, bool);
178  itkBooleanMacro(LoadSequences);
185  itkSetMacro(LoadPrivateTags, bool);
186  itkGetConstMacro(LoadPrivateTags, bool);
187  itkBooleanMacro(LoadPrivateTags);
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 
208  FileNamesContainerType m_InputFileNames{};
209  FileNamesContainerType m_OutputFileNames{};
210 
214  SeriesUIDContainerType m_SeriesUIDs{};
215 
216  bool m_UseSeriesDetails{};
217  bool m_Recursive{};
218  bool m_LoadSequences{};
219  bool m_LoadPrivateTags{};
220 };
221 } // namespace itk
222 
223 #endif // itkDCMTKSeriesFileNames_h
itkObjectFactory.h
itk::DCMTKSeriesFileNames::SeriesUIDContainer
SeriesUIDContainerType SeriesUIDContainer
Definition: itkDCMTKSeriesFileNames.h:66
itk::DCMTKSeriesFileNames::SetDirectory
void SetDirectory(const std::string &name)
Definition: itkDCMTKSeriesFileNames.h:92
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::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkMacro.h
itkProcessObject.h
itk::DCMTKSeriesFileNames::SetOutputDirectory
void SetOutputDirectory(const std::string &name)
Definition: itkDCMTKSeriesFileNames.h:105
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: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::DCMTKSeriesFileNames::GetUseSeriesDetails
bool GetUseSeriesDetails() const
Definition: itkDCMTKSeriesFileNames.h:155
itk::DCMTKSeriesFileNames
Generate a sequence of filenames from a DICOM series.
Definition: itkDCMTKSeriesFileNames.h:52
itk::DCMTKSeriesFileNames::FileNamesContainerType
std::vector< std::string > FileNamesContainerType
Definition: itkDCMTKSeriesFileNames.h:69