ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkGDCMSeriesFileNames.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 itkGDCMSeriesFileNames_h
19 #define itkGDCMSeriesFileNames_h
20 
21 #include "itkProcessObject.h"
22 #include "itkObjectFactory.h"
23 #include "itkMacro.h"
24 #include <vector>
25 #include "gdcmSerieHelper.h"
26 #include "ITKIOGDCMExport.h"
27 
28 namespace itk
29 {
53 typedef std::vector< std::string > FilenamesContainer;
54 typedef std::vector< std::string > SerieUIDContainer;
55 
56 class ITKIOGDCM_EXPORT GDCMSeriesFileNames:public ProcessObject
57 {
58 public:
63 
66 
69 
71  itkNewMacro(Self);
72 
74  itkTypeMacro(GDCMSeriesFileNames, ProcessObject);
75 
76  /* -------- Define the API for GDCMSeriesFileNames ----------- */
77 
79  void SetInputDirectory(const char *name);
80 
82  void SetInputDirectory(std::string const & name);
83 
85  void SetDirectory(std::string const & name)
86  {
87  SetInputDirectory(name);
88  }
89 
93  const FileNamesContainerType & GetInputFileNames();
94 
96  void SetOutputDirectory(std::string const & name)
97  {
98  m_OutputDirectory = name;
99  this->Modified();
100  }
102 
108  const FileNamesContainerType & GetOutputFileNames();
109 
116  const FileNamesContainerType & GetFileNames(const std::string serie);
117 
123  const SeriesUIDContainerType & GetSeriesUIDs();
124 
126  itkSetMacro(Recursive, bool);
127  itkGetConstMacro(Recursive, bool);
128  itkBooleanMacro(Recursive);
130 
135  void SetUseSeriesDetails(bool useSeriesDetails);
136 
142  {
143  return m_UseSeriesDetails;
144  }
145 
152  gdcm::SerieHelper * GetSeriesHelper(void)
153  {
154  return m_SerieHelper;
155  }
156 
163  void AddSeriesRestriction(const std::string & tag)
164  {
165  m_SerieHelper->AddRestriction(tag);
166  }
167 
172  itkSetMacro(LoadSequences, bool);
173  itkGetConstMacro(LoadSequences, bool);
174  itkBooleanMacro(LoadSequences);
176 
181  itkSetMacro(LoadPrivateTags, bool);
182  itkGetConstMacro(LoadPrivateTags, bool);
183  itkBooleanMacro(LoadPrivateTags);
185 
186 protected:
189  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
190 
191 private:
192  GDCMSeriesFileNames(const Self &); //purposely not implemented
193  void operator=(const Self &); //purposely not implemented
194 
196  std::string m_InputDirectory;
197 
199  std::string m_OutputDirectory;
200 
204 
206  gdcm::SerieHelper *m_SerieHelper;
207 
210 
215 };
216 } //namespace ITK
217 
218 #endif // itkGDCMSeriesFileNames_h
std::vector< std::string > FilenamesContainer
gdcm::SerieHelper * m_SerieHelper
Light weight base class for most itk classes.
gdcm::SerieHelper * GetSeriesHelper(void)
void SetDirectory(std::string const &name)
FileNamesContainerType m_OutputFileNames
void AddSeriesRestriction(const std::string &tag)
SeriesUIDContainerType m_SeriesUIDs
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
FileNamesContainerType m_InputFileNames
SmartPointer< Self > Pointer
std::vector< std::string > SerieUIDContainer
void SetOutputDirectory(std::string const &name)
SerieUIDContainer SeriesUIDContainerType
FilenamesContainer FileNamesContainerType
Generate a sequence of filenames from a DICOM series.
Control indentation during Print() invocation.
Definition: itkIndent.h:49