ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkDCMTKSeriesFileNames.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
51 class ITKIODCMTK_EXPORT DCMTKSeriesFileNames:public ProcessObject
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_ASSIGN(DCMTKSeriesFileNames);
55 
60 
62  using SeriesUIDContainerType = std::vector< std::string >;
63 
66 
68  using FileNamesContainerType = std::vector< std::string >;
69 
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(DCMTKSeriesFileNames, ProcessObject);
78 
79  /* -------- Define the API for DCMTKSeriesFileNames ----------- */
80 
82  void SetInputDirectory(const char *name);
83 
85  void SetInputDirectory(std::string const & name);
86 
88  void SetDirectory(std::string const & name)
89  {
90  SetInputDirectory(name);
91  }
92 
96  const FileNamesContainerType & GetInputFileNames();
97 
99  void SetOutputDirectory(std::string const & name)
100  {
101  m_OutputDirectory = name;
102  this->Modified();
103  }
105 
111  const FileNamesContainerType & GetOutputFileNames();
112 
119  const FileNamesContainerType & GetFileNames(const std::string serie);
120 
126  const SeriesUIDContainerType & GetSeriesUIDs();
127 
129  itkSetMacro(Recursive, bool);
130  itkGetConstMacro(Recursive, bool);
131  itkBooleanMacro(Recursive);
133 
138  void SetUseSeriesDetails(bool useSeriesDetails);
139 
145  {
146  return m_UseSeriesDetails;
147  }
148 
155  void AddSeriesRestriction(const std::string & /* tag */)
156  {
157  // m_SerieHelper->AddRestriction(tag);
158  }
159 
164  itkSetMacro(LoadSequences, bool);
165  itkGetConstMacro(LoadSequences, bool);
166  itkBooleanMacro(LoadSequences);
168 
173  itkSetMacro(LoadPrivateTags, bool);
174  itkGetConstMacro(LoadPrivateTags, bool);
175  itkBooleanMacro(LoadPrivateTags);
176 protected:
178  ~DCMTKSeriesFileNames() override;
179  void PrintSelf(std::ostream & os, Indent indent) const override;
181 
182 private:
184  void GetDicomData(const std::string &series, bool saveFileNames);
185 
187  std::string m_InputDirectory;
188 
190  std::string m_OutputDirectory;
191 
195 
200 
205 };
206 } //namespace ITK
207 
208 #endif // itkDCMTKSeriesFileNames_h
Light weight base class for most itk classes.
FileNamesContainerType FilenamesContainer
Generate a sequence of filenames from a DICOM series.
void SetDirectory(std::string const &name)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
FileNamesContainerType m_OutputFileNames
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
SeriesUIDContainerType m_SeriesUIDs
std::vector< std::string > FileNamesContainerType
void SetOutputDirectory(std::string const &name)
std::vector< std::string > SeriesUIDContainerType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void AddSeriesRestriction(const std::string &)
SeriesUIDContainerType SeriesUIDContainer
FileNamesContainerType m_InputFileNames