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: 2009-04-25 12:25:42 $
00007   Version:   $Revision: 1.18 $
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 
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   itkGetConstMacro(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   itkGetConstMacro(LoadSequences, bool);
00171   itkBooleanMacro(LoadSequences);
00173 
00178   itkSetMacro(LoadPrivateTags, bool);
00179   itkGetConstMacro(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&); //purposely not implemented
00190   void operator=(const Self&); //purposely not implemented
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 } //namespace ITK
00216 
00217 #endif // __itkGDCMSeriesFileNames_h
00218 

Generated at Tue Sep 15 03:02:06 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000