ITK  4.2.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;
53 class ITK_EXPORT GDCMSeriesFileNames:public ProcessObject
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 
84  const FilenamesContainer & GetInputFileNames();
85 
87  void SetOutputDirectory(std::string const & name)
88  {
89  m_OutputDirectory = name;
90  this->Modified();
91  }
93 
99  const FilenamesContainer & GetOutputFileNames();
100 
107  const FilenamesContainer & GetFileNames(const std::string serie);
108 
114  const SerieUIDContainer & GetSeriesUIDs();
115 
117  itkSetMacro(Recursive, bool);
118  itkGetConstMacro(Recursive, bool);
119  itkBooleanMacro(Recursive);
121 
126  void SetUseSeriesDetails(bool useSeriesDetails);
127 
132  bool GetUseSeriesDetails(void)
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);
175 protected:
178  void PrintSelf(std::ostream & os, Indent indent) const;
180 
181 private:
182  GDCMSeriesFileNames(const Self &); //purposely not implemented
183  void operator=(const Self &); //purposely not implemented
184 
186  std::string m_InputDirectory;
187 
189  std::string m_OutputDirectory;
190 
194 
196  gdcm::SerieHelper *m_SerieHelper;
197 
200 
205 };
206 } //namespace ITK
207 
208 #endif // __itkGDCMSeriesFileNames_h
209