ITK  4.3.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  >
38 {
39 public:
40 
46 
48  typedef typename GroupType::Pointer GroupPointer;
49 
51  typedef typename SceneType::Pointer ScenePointer;
52 
57 
59  itkNewMacro(Self);
60 
62  typedef Object Superclass;
63  itkTypeMacro(SpatialObjectReader, Object);
65 
67  void Update(void);
68 
70  itkSetStringMacro(FileName);
71 
73  itkGetStringMacro(FileName);
74 
76  ScenePointer GetScene(void) { return m_Scene; }
77  GroupPointer GetGroup(void) { return m_Group; }
79 
81  const MetaEvent * GetEvent() { return m_MetaToSpatialConverter.GetEvent(); }
82  void SetEvent(MetaEvent *event) { m_MetaToSpatialConverter.SetEvent(event); }
84 
86  void RegisterMetaConverter(const char *metaTypeName,
87  const char *spatialObjectTypeName,
88  MetaConverterBaseType *converter);
89 
90 protected:
91  SpatialObjectReader(const Self &); //purposely not implemented
92  void operator=(const Self &); //purposely not implemented
93 
94  std::string m_FileName;
95 
97  virtual ~SpatialObjectReader();
98 
99 private:
100 
103 
105 };
106 } // namespace itk
107 
108 #ifndef ITK_MANUAL_INSTANTIATION
109 #include "itkSpatialObjectReader.hxx"
110 #endif
111 
112 #endif // __itkSpatialObjectReader_h
113