ITK  4.9.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:
58 
60  typedef std::vector< std::string > SeriesUIDContainerType;
61 
64 
66  typedef std::vector< std::string > FileNamesContainerType;
67 
70 
72  itkNewMacro(Self);
73 
75  itkTypeMacro(DCMTKSeriesFileNames, ProcessObject);
76 
77  /* -------- Define the API for DCMTKSeriesFileNames ----------- */
78 
80  void SetInputDirectory(const char *name);
81 
83  void SetInputDirectory(std::string const & name);
84 
86  void SetDirectory(std::string const & name)
87  {
88  SetInputDirectory(name);
89  }
90 
94  const FileNamesContainerType & GetInputFileNames();
95 
97  void SetOutputDirectory(std::string const & name)
98  {
99  m_OutputDirectory = name;
100  this->Modified();
101  }
103 
109  const FileNamesContainerType & GetOutputFileNames();
110 
117  const FileNamesContainerType & GetFileNames(const std::string serie);
118 
124  const SeriesUIDContainerType & GetSeriesUIDs();
125 
127  itkSetMacro(Recursive, bool);
128  itkGetConstMacro(Recursive, bool);
129  itkBooleanMacro(Recursive);
131 
136  void SetUseSeriesDetails(bool useSeriesDetails);
137 
143  {
144  return m_UseSeriesDetails;
145  }
146 
153  void AddSeriesRestriction(const std::string & /* tag */)
154  {
155  // m_SerieHelper->AddRestriction(tag);
156  }
157 
162  itkSetMacro(LoadSequences, bool);
163  itkGetConstMacro(LoadSequences, bool);
164  itkBooleanMacro(LoadSequences);
166 
171  itkSetMacro(LoadPrivateTags, bool);
172  itkGetConstMacro(LoadPrivateTags, bool);
173  itkBooleanMacro(LoadPrivateTags);
174 protected:
177  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
179 
180 private:
181  DCMTKSeriesFileNames(const Self &) ITK_DELETE_FUNCTION;
182  void operator=(const Self &) ITK_DELETE_FUNCTION;
183 
185  void GetDicomData(const std::string &series, bool saveFileNames);
186 
188  std::string m_InputDirectory;
189 
191  std::string m_OutputDirectory;
192 
194  FileNamesContainerType m_InputFileNames;
195  FileNamesContainerType m_OutputFileNames;
196 
201 
202  bool m_UseSeriesDetails;
203  bool m_Recursive;
204  bool m_LoadSequences;
205  bool m_LoadPrivateTags;
206 };
207 } //namespace ITK
208 
209 #endif // itkDCMTKSeriesFileNames_h
Light weight base class for most itk classes.
Generate a sequence of filenames from a DICOM series.
SeriesUIDContainerType SeriesUIDContainer
void SetDirectory(std::string const &name)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
FileNamesContainerType FilenamesContainer
std::vector< std::string > SeriesUIDContainerType
void SetOutputDirectory(std::string const &name)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void AddSeriesRestriction(const std::string &)
std::vector< std::string > FileNamesContainerType