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

itkRegularExpressionSeriesFileNames.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkRegularExpressionSeriesFileNames.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:25:45 $
00007   Version:   $Revision: 1.7 $
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 __itkRegularExpressionSeriesFileNames_h
00018 #define __itkRegularExpressionSeriesFileNames_h
00019 
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023 
00024 #include "itkObject.h"
00025 #include "itkObjectFactory.h"
00026 #include "itkExceptionObject.h"
00027 #include <vector>
00028 
00029 namespace itk
00030 {
00031 
00072 class ITK_EXPORT RegularExpressionSeriesFileNames : public Object
00073 {
00074 public:
00076   typedef RegularExpressionSeriesFileNames Self;
00077   typedef Object                           Superclass;
00078   typedef SmartPointer<Self>               Pointer;
00079 
00081   itkNewMacro(Self);
00082 
00084   itkTypeMacro(RegularExpressionSeriesFileNames, Object);
00085 
00086   /* -------- Define the API for RegularExpressionSeriesFileNames ---------- */
00088   itkSetStringMacro(Directory);
00089   itkGetStringMacro(Directory);
00091 
00093   itkSetStringMacro(RegularExpression);
00094   itkGetStringMacro(RegularExpression);
00096 
00099   itkSetMacro(SubMatch, unsigned int);
00100   itkGetConstMacro(SubMatch, unsigned int);
00102 
00106   itkSetMacro(NumericSort,bool);
00107   itkGetConstMacro(NumericSort,bool);
00108   itkBooleanMacro(NumericSort);
00110 
00113   const std::vector<std::string> &GetFileNames ();
00114 
00115 protected:
00116   RegularExpressionSeriesFileNames() :
00117     m_Directory("."),
00118     m_SubMatch(1),
00119     m_NumericSort(false),
00120     m_RegularExpression(".*\\.([0-9]+)")
00121     {};
00122   ~RegularExpressionSeriesFileNames() {};
00123   void PrintSelf(std::ostream& os, Indent indent) const;
00124   
00125 private:
00126   RegularExpressionSeriesFileNames(const Self&); //purposely not implemented
00127   void operator=(const Self&); //purposely not implemented
00128   
00129   std::string  m_Directory;
00130   unsigned int m_SubMatch;
00131   bool         m_NumericSort;
00132   std::string  m_RegularExpression;
00133 
00134   std::vector<std::string>  m_FileNames;
00135 };
00136 
00137 } //namespace ITK
00138 
00139 #endif // __itkRegularExpressionSeriesFileNames_h
00140 

Generated at Mon Jul 12 2010 19:40:31 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000