ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSpatialObjectReader.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 itkSpatialObjectReader_h
19 #define itkSpatialObjectReader_h
20 
21 #include "itkMetaSceneConverter.h"
22 #include "itkMetaConverterBase.h"
23 #include "itkGroupSpatialObject.h"
24 #include "itkProcessObject.h"
25 
26 namespace itk
27 {
33 template< unsigned int NDimensions = 3,
34  typename PixelType = unsigned char,
35  typename TMeshTraits = DefaultStaticMeshTraits< PixelType, NDimensions, NDimensions >
36  >
37 class ITK_TEMPLATE_EXPORT SpatialObjectReader:public Object
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectReader);
41 
47 
49  using GroupPointer = typename GroupType::Pointer;
50 
57 
59  itkNewMacro(Self);
60 
62  using Superclass = Object;
63  itkTypeMacro(SpatialObjectReader, Object);
65 
67  void Update();
68 
70  itkSetStringMacro(FileName);
71 
73  itkGetStringMacro(FileName);
74 
76  GroupPointer GetGroup() { return m_Group; }
77 
79  const MetaEvent * GetEvent()
80  { return m_MetaToSpatialConverter->GetEvent(); }
81 
82  void SetEvent(MetaEvent *event)
83  { m_MetaToSpatialConverter->SetEvent(event); }
84 
86  void RegisterMetaConverter(const char *metaTypeName,
87  const char *spatialObjectTypeName,
88  MetaConverterBaseType *converter);
89 
90 protected:
91  std::string m_FileName;
92 
94  ~SpatialObjectReader() override = default;
95 
96 private:
97 
99 
101 };
102 } // namespace itk
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkSpatialObjectReader.hxx"
106 #endif
107 
108 #endif // itkSpatialObjectReader_h
Event abstract class.
Definition: itkMetaEvent.h:37
Light weight base class for most itk classes.
void SetEvent(MetaEvent *event)
typename SpatialObjectType::Pointer SpatialObjectPointer
Implementation of the composite pattern.
Converts between MetaObject and SpaitalObject scenes.
MetaSceneConverterType::Pointer m_MetaToSpatialConverter
typename GroupType::Pointer GroupPointer
Representation of a group based on the spatial object classes.
Base class for most ITK classes.
Definition: itkObject.h:60