00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkGDCMSeriesFileNames_h
00018 #define __itkGDCMSeriesFileNames_h
00019
00020 #include "itkObject.h"
00021 #include "itkObjectFactory.h"
00022 #include "itkExceptionObject.h"
00023 #include <vector>
00024 #include "gdcmSerieHelper.h"
00025
00026 namespace itk
00027 {
00028
00050 typedef std::vector<std::string> FilenamesContainer;
00051 typedef std::vector<std::string> SerieUIDContainer;
00052 class ITK_EXPORT GDCMSeriesFileNames : public Object
00053 {
00054 public:
00056 typedef GDCMSeriesFileNames Self;
00057 typedef Object Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059
00061 itkNewMacro(Self);
00062
00064 itkTypeMacro(GDCMSeriesFileNames, Object);
00065
00066
00067
00069 void SetInputDirectory (const char * name);
00070
00072 void SetInputDirectory (std::string const &name);
00073
00075 void SetDirectory (std::string const &name)
00076 {
00077 SetInputDirectory(name);
00078 }
00079
00083 const FilenamesContainer &GetInputFileNames () ;
00084
00086 void SetOutputDirectory (std::string const &name)
00087 {
00088 m_OutputDirectory = name;
00089 this->Modified();
00090 }
00092
00098 const FilenamesContainer &GetOutputFileNames () ;
00099
00106 const FilenamesContainer &GetFileNames(const std::string serie);
00107
00113 const SerieUIDContainer &GetSeriesUIDs();
00114
00116 itkSetMacro(Recursive, bool);
00117 itkGetMacro(Recursive, bool);
00118 itkBooleanMacro(Recursive);
00120
00125 void SetUseSeriesDetails( bool useSeriesDetails)
00126 {
00127 m_UseSeriesDetails = useSeriesDetails;
00128 m_SerieHelper->SetUseSeriesDetails( m_UseSeriesDetails );
00129 m_SerieHelper->CreateDefaultUniqueSeriesIdentifier();
00130 }
00132
00137 bool GetUseSeriesDetails( void )
00138 {
00139 return m_UseSeriesDetails;
00140 }
00141
00148 gdcm::SerieHelper * GetSeriesHelper( void )
00149 {
00150 return m_SerieHelper;
00151 }
00152
00159 void AddSeriesRestriction(const std::string & tag)
00160 {
00161 m_SerieHelper->AddRestriction( tag );
00162 }
00163
00164
00169 itkSetMacro(LoadSequences, bool);
00170 itkGetMacro(LoadSequences, bool);
00171 itkBooleanMacro(LoadSequences);
00173
00178 itkSetMacro(LoadPrivateTags, bool);
00179 itkGetMacro(LoadPrivateTags, bool);
00180 itkBooleanMacro(LoadPrivateTags);
00182
00183 protected:
00184 GDCMSeriesFileNames();
00185 ~GDCMSeriesFileNames();
00186 void PrintSelf(std::ostream& os, Indent indent) const;
00187
00188 private:
00189 GDCMSeriesFileNames(const Self&);
00190 void operator=(const Self&);
00191
00193 std::string m_InputDirectory;
00194
00196 std::string m_OutputDirectory;
00197
00199 FilenamesContainer m_InputFileNames;
00200 FilenamesContainer m_OutputFileNames;
00201
00203 gdcm::SerieHelper *m_SerieHelper;
00204
00206 SerieUIDContainer m_SeriesUIDs;
00207
00208 bool m_UseSeriesDetails;
00209 bool m_Recursive;
00210 bool m_LoadSequences;
00211 bool m_LoadPrivateTags;
00212
00213 };
00214
00215 }
00216
00217 #endif // __itkGDCMSeriesFileNames_h
00218