ITK  4.7.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 
27 namespace itk
28 {
52 typedef std::vector< std::string > FilenamesContainer;
53 typedef std::vector< std::string > SerieUIDContainer;
54 
56 {
57 public:
62 
65 
68 
70  itkNewMacro(Self);
71 
73  itkTypeMacro(GDCMSeriesFileNames, ProcessObject);
74 
75  /* -------- Define the API for GDCMSeriesFileNames ----------- */
76 
78  void SetInputDirectory(const char *name);
79 
81  void SetInputDirectory(std::string const & name);
82 
84  void SetDirectory(std::string const & name)
85  {
86  SetInputDirectory(name);
87  }
88 
93 
95  void SetOutputDirectory(std::string const & name)
96  {
97  m_OutputDirectory = name;
98  this->Modified();
99  }
101 
108 
115  const FileNamesContainerType & GetFileNames(const std::string serie);
116 
123 
125  itkSetMacro(Recursive, bool);
126  itkGetConstMacro(Recursive, bool);
127  itkBooleanMacro(Recursive);
129 
134  void SetUseSeriesDetails(bool useSeriesDetails);
135 
141  {
142  return m_UseSeriesDetails;
143  }
144 
151  gdcm::SerieHelper * GetSeriesHelper(void)
152  {
153  return m_SerieHelper;
154  }
155 
162  void AddSeriesRestriction(const std::string & tag)
163  {
164  m_SerieHelper->AddRestriction(tag);
165  }
166 
171  itkSetMacro(LoadSequences, bool);
172  itkGetConstMacro(LoadSequences, bool);
173  itkBooleanMacro(LoadSequences);
175 
180  itkSetMacro(LoadPrivateTags, bool);
181  itkGetConstMacro(LoadPrivateTags, bool);
182  itkBooleanMacro(LoadPrivateTags);
184 
185 protected:
188  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
189 
190 private:
191  GDCMSeriesFileNames(const Self &); //purposely not implemented
192  void operator=(const Self &); //purposely not implemented
193 
195  std::string m_InputDirectory;
196 
198  std::string m_OutputDirectory;
199 
203 
205  gdcm::SerieHelper *m_SerieHelper;
206 
209 
214 };
215 } //namespace ITK
216 
217 #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)
void SetInputDirectory(const char *name)
SeriesUIDContainerType m_SeriesUIDs
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
FileNamesContainerType m_InputFileNames
const FileNamesContainerType & GetFileNames(const std::string serie)
const SeriesUIDContainerType & GetSeriesUIDs()
SmartPointer< Self > Pointer
std::vector< std::string > SerieUIDContainer
void SetOutputDirectory(std::string const &name)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
SerieUIDContainer SeriesUIDContainerType
virtual void Modified() const
void operator=(const Self &)
const FileNamesContainerType & GetOutputFileNames()
void SetUseSeriesDetails(bool useSeriesDetails)
FilenamesContainer FileNamesContainerType
Generate a sequence of filenames from a DICOM series.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
const FileNamesContainerType & GetInputFileNames()