ITK  4.6.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 {
51 typedef std::vector< std::string > FilenamesContainer;
52 typedef std::vector< std::string > SerieUIDContainer;
54 {
55 public:
60 
62  itkNewMacro(Self);
63 
65  itkTypeMacro(GDCMSeriesFileNames, ProcessObject);
66 
67  /* -------- Define the API for GDCMSeriesFileNames ----------- */
68 
70  void SetInputDirectory(const char *name);
71 
73  void SetInputDirectory(std::string const & name);
74 
76  void SetDirectory(std::string const & name)
77  {
78  SetInputDirectory(name);
79  }
80 
85 
87  void SetOutputDirectory(std::string const & name)
88  {
89  m_OutputDirectory = name;
90  this->Modified();
91  }
93 
100 
107  const FilenamesContainer & GetFileNames(const std::string serie);
108 
115 
117  itkSetMacro(Recursive, bool);
118  itkGetConstMacro(Recursive, bool);
119  itkBooleanMacro(Recursive);
121 
126  void SetUseSeriesDetails(bool useSeriesDetails);
127 
133  {
134  return m_UseSeriesDetails;
135  }
136 
143  gdcm::SerieHelper * GetSeriesHelper(void)
144  {
145  return m_SerieHelper;
146  }
147 
154  void AddSeriesRestriction(const std::string & tag)
155  {
156  m_SerieHelper->AddRestriction(tag);
157  }
158 
163  itkSetMacro(LoadSequences, bool);
164  itkGetConstMacro(LoadSequences, bool);
165  itkBooleanMacro(LoadSequences);
167 
172  itkSetMacro(LoadPrivateTags, bool);
173  itkGetConstMacro(LoadPrivateTags, bool);
174  itkBooleanMacro(LoadPrivateTags);
176 
177 protected:
180  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
181 
182 private:
183  GDCMSeriesFileNames(const Self &); //purposely not implemented
184  void operator=(const Self &); //purposely not implemented
185 
187  std::string m_InputDirectory;
188 
190  std::string m_OutputDirectory;
191 
195 
197  gdcm::SerieHelper *m_SerieHelper;
198 
201 
206 };
207 } //namespace ITK
208 
209 #endif // __itkGDCMSeriesFileNames_h
std::vector< std::string > FilenamesContainer
gdcm::SerieHelper * m_SerieHelper
Light weight base class for most itk classes.
const FilenamesContainer & GetInputFileNames()
const SerieUIDContainer & GetSeriesUIDs()
gdcm::SerieHelper * GetSeriesHelper(void)
void SetDirectory(std::string const &name)
void AddSeriesRestriction(const std::string &tag)
void SetInputDirectory(const char *name)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
const FilenamesContainer & GetFileNames(const std::string serie)
FilenamesContainer m_OutputFileNames
const FilenamesContainer & GetOutputFileNames()
SmartPointer< Self > Pointer
std::vector< std::string > SerieUIDContainer
FilenamesContainer m_InputFileNames
void SetOutputDirectory(std::string const &name)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
virtual void Modified() const
void operator=(const Self &)
void SetUseSeriesDetails(bool useSeriesDetails)
Generate a sequence of filenames from a DICOM series.
Control indentation during Print() invocation.
Definition: itkIndent.h:49