go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageSpatialObject2.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
17 /*=========================================================================
18 
19  Program: Insight Segmentation & Registration Toolkit
20  Module: $RCSfile$
21  Language: C++
22  Date: $Date: 2008-05-28 10:45:42 +0200 (Wed, 28 May 2008) $
23  Version: $Revision: 1636 $
24 
25  Copyright (c) Insight Software Consortium. All rights reserved.
26  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27 
28  This software is distributed WITHOUT ANY WARRANTY; without even
29  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30  PURPOSE. See the above copyright notices for more information.
31 
32 =========================================================================*/
33 #ifndef __itkImageSpatialObject2_h
34 #define __itkImageSpatialObject2_h
35 
36 #include "itkImage.h"
37 #include "itkExceptionObject.h"
38 #include "itkSpatialObject.h"
39 #include "itkInterpolateImageFunction.h"
40 #include "itkNearestNeighborInterpolateImageFunction.h"
41 
42 namespace itk
43 {
44 
55 template< unsigned int TDimension = 3,
56 class TPixelType = unsigned char
57 >
59  public SpatialObject< TDimension >
60 {
61 
62 public:
63 
64  typedef double ScalarType;
66  typedef SpatialObject< TDimension > Superclass;
67  typedef SmartPointer< Self > Pointer;
68  typedef SmartPointer< const Self > ConstPointer;
69 
70  typedef TPixelType PixelType;
71  typedef Image< PixelType, TDimension > ImageType;
72  typedef typename ImageType::ConstPointer ImagePointer;
73  typedef typename ImageType::IndexType IndexType;
74  typedef typename ImageType::SizeType SizeType;
75  typedef typename ImageType::RegionType RegionType;
76  typedef typename Superclass::TransformType TransformType;
77  typedef typename Superclass::PointType PointType;
78  typedef typename Superclass::BoundingBoxType BoundingBoxType;
79  typedef InterpolateImageFunction< ImageType > InterpolatorType;
80 
81  typedef NearestNeighborInterpolateImageFunction< ImageType >
83 
84  typedef VectorContainer< unsigned long, PointType > PointContainerType;
85  typedef typename PointContainerType::Pointer PointContainerPointer;
86 
88  itkNewMacro( Self );
89 
91  itkTypeMacro( ImageSpatialObject2, SpatialObject );
92 
94  void SetImage( const ImageType * image );
95 
97  const ImageType * GetImage( void ) const;
98 
101  bool IsEvaluableAt( const PointType & point,
102  unsigned int depth = 0, char * name = NULL ) const;
103 
107  bool ValueAt( const PointType & point, double & value,
108  unsigned int depth = 0, char * name = NULL ) const;
109 
111  bool IsInside( const PointType & point,
112  unsigned int depth, char * name ) const;
113 
117  bool IsInside( const PointType & point ) const;
118 
120  bool ComputeLocalBoundingBox() const;
121 
123  unsigned long GetMTime( void ) const;
124 
126  void SetSlicePosition( unsigned int dimension, int position );
127 
129  int GetSlicePosition( unsigned int dimension )
130  { return m_SlicePosition[ dimension ]; }
131 
132  const char * GetPixelType()
133  {
134  return m_PixelType.c_str();
135  }
136 
137 
139  void SetInterpolator( InterpolatorType * interpolator );
140 
141  itkGetObjectMacro( Interpolator, InterpolatorType );
142 
143 protected:
144 
145  ImageSpatialObject2( const Self & ); // purposely not implemented
146  void operator=( const Self & ); // purposely not implemented
147 
149 
151  virtual ~ImageSpatialObject2();
152 
153  void PrintSelf( std::ostream & os, Indent indent ) const;
154 
156  std::string m_PixelType;
157 
158  typename InterpolatorType::Pointer m_Interpolator;
159 };
160 
161 } // end of namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 #include "itkImageSpatialObject2.hxx"
165 #endif
166 
167 #endif //__itkImageSpatialObject2_h
InterpolatorType::Pointer m_Interpolator
Superclass::PointType PointType
bool IsInside(const PointType &point, unsigned int depth, char *name) const
void operator=(const Self &)
SmartPointer< const Self > ConstPointer
void SetImage(const ImageType *image)
ImageType::IndexType IndexType
unsigned long GetMTime(void) const
SpatialObject< TDimension > Superclass
int GetSlicePosition(unsigned int dimension)
Implementation of an image as spatial object.
bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=NULL) const
Image< PixelType, TDimension > ImageType
InterpolateImageFunction< ImageType > InterpolatorType
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const
const ImageType * GetImage(void) const
Superclass::BoundingBoxType BoundingBoxType
PointContainerType::Pointer PointContainerPointer
Superclass::TransformType TransformType
VectorContainer< unsigned long, PointType > PointContainerType
void SetInterpolator(InterpolatorType *interpolator)
bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=NULL) const
ImageSpatialObject2< TDimension, TPixelType > Self
ImageType::RegionType RegionType
bool ComputeLocalBoundingBox() const
void SetSlicePosition(unsigned int dimension, int position)
NearestNeighborInterpolateImageFunction< ImageType > NNInterpolatorType
ImageType::ConstPointer ImagePointer


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo