Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkGDCMSeriesFileNames.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGDCMSeriesFileNames.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/05/16 19:11:26 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00046 typedef std::vector<std::string> FilenamesContainer;
00047 typedef std::vector<std::string> SerieUIDContainer;
00048 class ITK_EXPORT GDCMSeriesFileNames : public Object
00049 {
00050 public:
00052   typedef GDCMSeriesFileNames     Self;
00053   typedef Object                  Superclass;
00054   typedef SmartPointer<Self>      Pointer;
00055   
00057   itkNewMacro(Self);
00058 
00060   itkTypeMacro(GDCMSeriesFileNames, Object);
00061 
00062   /* -------- Define the API for GDCMSeriesFileNames ----------- */
00063 
00065   void SetInputDirectory (const char * name)
00066     {
00067     if( !name )
00068       {
00069       itkExceptionMacro(<<"SetInputDirectory() received a NULL string");
00070       }
00071     std::string fname = name;
00072     this->SetInputDirectory( fname );
00073     }
00074 
00076   void SetInputDirectory (std::string const &name)
00077     {
00078     m_InputDirectory = name;
00079     this->Modified();
00080     }
00081 
00083   void SetDirectory (std::string const &name)
00084     {
00085     m_Directory = name;
00086     m_SerieHelper->SetDirectory( name ); //as a side effect it also execute
00087     m_SerieHelper->Print();
00088     this->Modified();
00089     }
00090 
00093   const FilenamesContainer &GetInputFileNames () ;
00094 
00096   void SetOutputDirectory (std::string const &name)
00097     {
00098     m_OutputDirectory = name;
00099     this->Modified();
00100     }
00101 
00107   const FilenamesContainer &GetOutputFileNames () ;
00108 
00114   const FilenamesContainer &GetFileNames(const std::string serie);
00115 
00120   const SerieUIDContainer &GetSeriesUIDs();
00121 
00122 protected:
00123   GDCMSeriesFileNames();
00124   ~GDCMSeriesFileNames();
00125   void PrintSelf(std::ostream& os, Indent indent) const;
00126   
00127 private:
00128   GDCMSeriesFileNames(const Self&); //purposely not implemented
00129   void operator=(const Self&); //purposely not implemented
00130   
00132   std::string m_InputDirectory;
00133 
00135   std::string m_OutputDirectory;
00136 
00138   std::string m_Directory;
00139 
00141   FilenamesContainer  m_InputFileNames;
00142   FilenamesContainer  m_OutputFileNames;
00143 
00145   gdcm::SerieHelper *m_SerieHelper;
00146 
00148   FilenamesContainer  m_FileNames;
00149 
00151   SerieUIDContainer m_SeriesUIDs;
00152 };
00153 
00154 } //namespace ITK
00155 
00156 #endif // __itkGDCMSeriesFileNames_h

Generated at Tue Aug 30 16:44:00 2005 for ITK by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2000