ITK  5.0.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 #include "ITKIOImageBaseExport.h"
21 
22 
23 #include "itkObject.h"
24 #include "itkObjectFactory.h"
25 #include <vector>
26 #include <string>
27 
28 namespace itk
29 {
68 class ITKIOImageBase_EXPORT ArchetypeSeriesFileNames:public Object
69 {
70 public:
71  ITK_DISALLOW_COPY_AND_ASSIGN(ArchetypeSeriesFileNames);
72 
75  using Superclass = Object;
77 
79  itkNewMacro(Self);
80 
82  itkTypeMacro(ArchetypeSeriesFileNames, Object);
83 
84  /* -------- Define the API for ArchetypeSeriesFileNames ----------- */
85 
86  // The archetypical filename from which to generate the regular
87  // expressions
88  void SetArchetype(const std::string & archetype);
89 
90  itkGetStringMacro(Archetype);
91 
92  using VectorSizeType = size_t;
93 
95  VectorSizeType GetNumberOfGroupings();
96 
98  using IntVectorType = std::vector< int >;
99  using StringVectorType = std::vector< std::string >;
100 
104  const StringVectorType & GetFileNames(VectorSizeType group = 0);
105 
106 protected:
108  ~ArchetypeSeriesFileNames() override = default;
109  void PrintSelf(std::ostream & os, Indent indent) const override;
110 
112  void Scan();
113 
114 private:
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
Light weight base class for most itk classes.
Generate an ordered sequence of filenames.
Generate a unique, increasing time value.
Definition: itkTimeStamp.h:60
std::vector< StringVectorType > m_Groupings
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
std::vector< std::string > StringVectorType