ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkArchetypeSeriesFileNames.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkArchetypeSeriesFileNames_h
19 #define __itkArchetypeSeriesFileNames_h
20 
21 
22 #include "itkObject.h"
23 #include "itkObjectFactory.h"
24 #include <vector>
25 #include <string>
26 
27 namespace itk
28 {
67 class ITK_EXPORT ArchetypeSeriesFileNames:public Object
68 {
69 public:
72  typedef Object Superclass;
74 
76  itkNewMacro(Self);
77 
79  itkTypeMacro(ArchetypeSeriesFileNames, Object);
80 
81  /* -------- Define the API for ArchetypeSeriesFileNames ----------- */
82 
83  // The archetypical filename from which to generate the regular
84  // expressions
85  void SetArchetype(const std::string & archetype);
86 
87  itkGetStringMacro(Archetype);
88 
89  typedef size_t VectorSizeType;
90 
92  VectorSizeType GetNumberOfGroupings();
93 
95  typedef std::vector< int > IntVectorType;
96  typedef std::vector< std::string > StringVectorType;
97 
101  const StringVectorType & GetFileNames(VectorSizeType group = 0);
102 
103 protected:
106  void PrintSelf(std::ostream & os, Indent indent) const;
107 
109  void Scan();
110 
111 private:
112  ArchetypeSeriesFileNames(const Self &); //purposely not implemented
113  void operator=(const Self &); //purposely not implemented
114 
116  std::string m_Archetype;
117 
118  std::vector< StringVectorType > m_Groupings;
119  StringVectorType m_FileNames; // ivar for returning by
120  // reference
121 
124 };
125 } //namespace ITK
126 
127 #endif // __itkArchetypeSeriesFileNames_h
128