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: 2006/06/06 12:53:07 $
00007   Version:   $Revision: 1.12.2.1 $
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 "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   /* -------- Define the API for GDCMSeriesFileNames ----------- */
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     }
00079 
00081   void SetInputDirectory (std::string const &name);
00082 
00084   void SetDirectory (std::string const &name)
00085     {
00086     SetInputDirectory(name);
00087     }
00088 
00092   const FilenamesContainer &GetInputFileNames () ;
00093 
00095   void SetOutputDirectory (std::string const &name)
00096     {
00097     m_OutputDirectory = name;
00098     this->Modified();
00099     }
00101 
00107   const FilenamesContainer &GetOutputFileNames () ;
00108 
00115   const FilenamesContainer &GetFileNames(const std::string serie);
00116 
00122   const SerieUIDContainer &GetSeriesUIDs();
00123 
00128   void SetUseSeriesDetails( bool useSeriesDetails)
00129     {
00130     m_UseSeriesDetails = useSeriesDetails;
00131     m_SerieHelper->SetUseSeriesDetails( m_UseSeriesDetails );
00132     m_SerieHelper->CreateDefaultUniqueSeriesIdentifier();
00133     }
00135 
00140   bool GetUseSeriesDetails( void )
00141     {
00142     return m_UseSeriesDetails;
00143     }
00144 
00151   gdcm::SerieHelper * GetSeriesHelper( void )
00152     {
00153     return m_SerieHelper;
00154     }
00155 
00162   void AddSeriesRestriction(const std::string & tag)
00163     {
00164     m_SerieHelper->AddRestriction( tag );
00165     }
00166 
00167 
00172   itkSetMacro(LoadSequences, bool);
00173   itkGetMacro(LoadSequences, bool);
00174   itkBooleanMacro(LoadSequences);
00176 
00181   itkSetMacro(LoadPrivateTags, bool);
00182   itkGetMacro(LoadPrivateTags, bool);
00183   itkBooleanMacro(LoadPrivateTags);
00185 
00186   
00187 protected:
00188   GDCMSeriesFileNames();
00189   ~GDCMSeriesFileNames();
00190   void PrintSelf(std::ostream& os, Indent indent) const;
00191   
00192 private:
00193   GDCMSeriesFileNames(const Self&); //purposely not implemented
00194   void operator=(const Self&); //purposely not implemented
00195   
00197   std::string m_InputDirectory;
00198 
00200   std::string m_OutputDirectory;
00201 
00203   FilenamesContainer  m_InputFileNames;
00204   FilenamesContainer  m_OutputFileNames;
00205 
00207   gdcm::SerieHelper *m_SerieHelper;
00208 
00210   SerieUIDContainer m_SeriesUIDs;
00211 
00212   bool              m_UseSeriesDetails;
00213   bool m_LoadSequences;
00214   bool m_LoadPrivateTags;
00215 
00216 };
00217 
00218 } //namespace ITK
00219 
00220 #endif // __itkGDCMSeriesFileNames_h
00221 

Generated at Sat Sep 2 20:27:34 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000