00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00088 itkSetStringMacro(Directory);
00089 itkGetStringMacro(Directory);
00090
00092 itkSetStringMacro(RegularExpression);
00093 itkGetStringMacro(RegularExpression);
00094
00097 itkSetMacro(SubMatch, unsigned int);
00098 itkGetMacro(SubMatch, unsigned int);
00099
00103 itkSetMacro(NumericSort,bool);
00104 itkGetMacro(NumericSort,bool);
00105 itkBooleanMacro(NumericSort);
00106
00109 const std::vector<std::string> &GetFileNames ();
00110
00111 protected:
00112 RegularExpressionSeriesFileNames() :
00113 m_Directory("."),
00114 m_SubMatch(1),
00115 m_NumericSort(false),
00116 m_RegularExpression(".*\\.([0-9]+)")
00117 {};
00118 ~RegularExpressionSeriesFileNames() {};
00119 void PrintSelf(std::ostream& os, Indent indent) const;
00120
00121 private:
00122 RegularExpressionSeriesFileNames(const Self&);
00123 void operator=(const Self&);
00124
00125 std::string m_Directory;
00126 unsigned int m_SubMatch;
00127 bool m_NumericSort;
00128 std::string m_RegularExpression;
00129
00130 std::vector<std::string> m_FileNames;
00131 };
00132
00133 }
00134
00135 #endif // __itkRegularExpressionSeriesFileNames_h