ITK  5.2.0
Insight Toolkit
itkArchetypeSeriesFileNames.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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_MOVE(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
89  SetArchetype(const std::string & archetype);
90 
91  itkGetStringMacro(Archetype);
92 
93  using VectorSizeType = size_t;
94 
97  GetNumberOfGroupings();
98 
100  using IntVectorType = std::vector<int>;
101  using StringVectorType = std::vector<std::string>;
102 
106  const StringVectorType &
107  GetFileNames(VectorSizeType group = 0);
108 
109 protected:
111  ~ArchetypeSeriesFileNames() override = default;
112  void
113  PrintSelf(std::ostream & os, Indent indent) const override;
114 
116  void
117  Scan();
118 
119 private:
121  std::string m_Archetype;
122 
123  std::vector<StringVectorType> m_Groupings;
124  StringVectorType m_FileNames; // ivar for returning by
125  // reference
126 
129 };
130 } // namespace itk
131 
132 #endif // itkArchetypeSeriesFileNames_h
itk::ArchetypeSeriesFileNames::m_Archetype
std::string m_Archetype
Definition: itkArchetypeSeriesFileNames.h:121
itk::ArchetypeSeriesFileNames::m_ArchetypeMTime
TimeStamp m_ArchetypeMTime
Definition: itkArchetypeSeriesFileNames.h:127
itkObjectFactory.h
itk::ArchetypeSeriesFileNames::m_FileNames
StringVectorType m_FileNames
Definition: itkArchetypeSeriesFileNames.h:124
itk::ArchetypeSeriesFileNames::m_Groupings
std::vector< StringVectorType > m_Groupings
Definition: itkArchetypeSeriesFileNames.h:123
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ArchetypeSeriesFileNames::VectorSizeType
vcl_size_t VectorSizeType
Definition: itkArchetypeSeriesFileNames.h:93
itk::TimeStamp
Generate a unique, increasing time value.
Definition: itkTimeStamp.h:60
itkObject.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ArchetypeSeriesFileNames
Generate an ordered sequence of filenames.
Definition: itkArchetypeSeriesFileNames.h:68
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::ArchetypeSeriesFileNames::StringVectorType
std::vector< std::string > StringVectorType
Definition: itkArchetypeSeriesFileNames.h:101
itk::ArchetypeSeriesFileNames::IntVectorType
std::vector< int > IntVectorType
Definition: itkArchetypeSeriesFileNames.h:100
itk::ArchetypeSeriesFileNames::m_ScanTime
TimeStamp m_ScanTime
Definition: itkArchetypeSeriesFileNames.h:128