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 "gdcm/src/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 {
00071 if( !name )
00072 {
00073 itkExceptionMacro(<<"SetInputDirectory() received a NULL string");
00074 }
00075 std::string fname = name;
00076 this->SetInputDirectory( fname );
00077 }
00078
00080 void SetInputDirectory (std::string const &name);
00081
00083 void SetDirectory (std::string const &name)
00084 {
00085 SetInputDirectory(name);
00086 }
00087
00091 const FilenamesContainer &GetInputFileNames () ;
00092
00094 void SetOutputDirectory (std::string const &name)
00095 {
00096 m_OutputDirectory = name;
00097 this->Modified();
00098 }
00099
00105 const FilenamesContainer &GetOutputFileNames () ;
00106
00113 const FilenamesContainer &GetFileNames(const std::string serie);
00114
00120 const SerieUIDContainer &GetSeriesUIDs();
00121
00126 void SetUseSeriesDetails( bool useSeriesDetails)
00127 {
00128 m_UseSeriesDetails = useSeriesDetails;
00129 m_SerieHelper->SetUseSeriesDetails( m_UseSeriesDetails );
00130 }
00131
00136 bool GetUseSeriesDetails( void )
00137 {
00138 return m_UseSeriesDetails;
00139 }
00140
00147 gdcm::SerieHelper * GetSeriesHelper( void )
00148 {
00149 return m_SerieHelper;
00150 }
00151
00152 protected:
00153 GDCMSeriesFileNames();
00154 ~GDCMSeriesFileNames();
00155 void PrintSelf(std::ostream& os, Indent indent) const;
00156
00157 private:
00158 GDCMSeriesFileNames(const Self&);
00159 void operator=(const Self&);
00160
00162 std::string m_InputDirectory;
00163
00165 std::string m_OutputDirectory;
00166
00168 FilenamesContainer m_InputFileNames;
00169 FilenamesContainer m_OutputFileNames;
00170
00172 gdcm::SerieHelper *m_SerieHelper;
00173
00175 SerieUIDContainer m_SeriesUIDs;
00176
00177 bool m_UseSeriesDetails;
00178 };
00179
00180 }
00181
00182 #endif // __itkGDCMSeriesFileNames_h