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  * Copyright UMC Utrecht and contributors
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 
21 /*=========================================================================
22 
23  Program: Insight Segmentation & Registration Toolkit
24  Module: $RCSfile$
25  Language: C++
26  Date: $Date: 2008-05-28 10:45:42 +0200 (Wed, 28 May 2008) $
27  Version: $Revision: 1636 $
28 
29  Copyright (c) Insight Software Consortium. All rights reserved.
30  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
31 
32  This software is distributed WITHOUT ANY WARRANTY; without even
33  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
34  PURPOSE. See the above copyright notices for more information.
35 
36 =========================================================================*/
37 #ifndef __itkImageSpatialObject2_h
38 #define __itkImageSpatialObject2_h
39 
40 #include "itkImage.h"
41 #include "itkExceptionObject.h"
42 #include "itkSpatialObject.h"
43 #include "itkInterpolateImageFunction.h"
44 #include "itkNearestNeighborInterpolateImageFunction.h"
45 
46 namespace itk
47 {
48 
59 template< unsigned int TDimension = 3,
60 class TPixelType = unsigned char
61 >
63  public SpatialObject< TDimension >
64 {
65 
66 public:
67 
68  typedef double ScalarType;
70  typedef SpatialObject< TDimension > Superclass;
72  typedef SmartPointer< const Self > ConstPointer;
73 
74  typedef TPixelType PixelType;
76  typedef typename ImageType::ConstPointer ImagePointer;
77  typedef typename ImageType::IndexType IndexType;
78  typedef typename ImageType::SizeType SizeType;
79  typedef typename ImageType::RegionType RegionType;
80  typedef typename Superclass::TransformType TransformType;
81  typedef typename Superclass::PointType PointType;
82  typedef typename Superclass::BoundingBoxType BoundingBoxType;
83  typedef InterpolateImageFunction< ImageType > InterpolatorType;
84 
85  typedef NearestNeighborInterpolateImageFunction< ImageType >
87 
88  typedef VectorContainer< unsigned long, PointType > PointContainerType;
89  typedef typename PointContainerType::Pointer PointContainerPointer;
90 
92  itkNewMacro( Self );
93 
95  itkTypeMacro( ImageSpatialObject2, SpatialObject );
96 
98  void SetImage( const ImageType * image );
99 
101  const ImageType * GetImage( void ) const;
102 
105  bool IsEvaluableAt( const PointType & point,
106  unsigned int depth = 0, char * name = NULL ) const;
107 
111  bool ValueAt( const PointType & point, double & value,
112  unsigned int depth = 0, char * name = NULL ) const;
113 
115  bool IsInside( const PointType & point,
116  unsigned int depth, char * name ) const;
117 
121  bool IsInside( const PointType & point ) const;
122 
125 
127  unsigned long GetMTime( void ) const;
128 
130  void SetSlicePosition( unsigned int dimension, int position );
131 
133  int GetSlicePosition( unsigned int dimension )
134  { return m_SlicePosition[ dimension ]; }
135 
136  const char * GetPixelType()
137  {
138  return m_PixelType.c_str();
139  }
140 
141 
143  void SetInterpolator( InterpolatorType * interpolator );
144 
145  itkGetObjectMacro( Interpolator, InterpolatorType );
146 
147 protected:
148 
149  ImageSpatialObject2( const Self & ); // purposely not implemented
150  void operator=( const Self & ); // purposely not implemented
151 
153 
156 
157  void PrintSelf( std::ostream & os, Indent indent ) const;
158 
160  std::string m_PixelType;
161 
162  typename InterpolatorType::Pointer m_Interpolator;
163 };
164 
165 } // end of namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkImageSpatialObject2.hxx"
169 #endif
170 
171 #endif //__itkImageSpatialObject2_h
itk::ImageSpatialObject2::~ImageSpatialObject2
virtual ~ImageSpatialObject2()
itk::ImageSpatialObject2::GetSlicePosition
int GetSlicePosition(unsigned int dimension)
Definition: itkImageSpatialObject2.h:133
itk::ImageSpatialObject2::NNInterpolatorType
NearestNeighborInterpolateImageFunction< ImageType > NNInterpolatorType
Definition: itkImageSpatialObject2.h:86
SmartPointer< Self >
itk::ImageSpatialObject2::RegionType
ImageType::RegionType RegionType
Definition: itkImageSpatialObject2.h:79
itk::ImageSpatialObject2::PointContainerPointer
PointContainerType::Pointer PointContainerPointer
Definition: itkImageSpatialObject2.h:89
itk::ImageSpatialObject2::Pointer
SmartPointer< Self > Pointer
Definition: itkImageSpatialObject2.h:71
itk::ImageSpatialObject2::m_Interpolator
InterpolatorType::Pointer m_Interpolator
Definition: itkImageSpatialObject2.h:162
Image
itk::ImageSpatialObject2::IsInside
bool IsInside(const PointType &point, unsigned int depth, char *name) const
itk::ImageSpatialObject2::ImageSpatialObject2
ImageSpatialObject2(const Self &)
itk::ImageSpatialObject2::GetImage
const ImageType * GetImage(void) const
itk::ImageSpatialObject2::ImagePointer
ImageType::ConstPointer ImagePointer
Definition: itkImageSpatialObject2.h:76
itk::ImageSpatialObject2::SetInterpolator
void SetInterpolator(InterpolatorType *interpolator)
itk::ImageSpatialObject2::SizeType
ImageType::SizeType SizeType
Definition: itkImageSpatialObject2.h:78
itk::ImageSpatialObject2::SetSlicePosition
void SetSlicePosition(unsigned int dimension, int position)
itk::ImageSpatialObject2::PointContainerType
VectorContainer< unsigned long, PointType > PointContainerType
Definition: itkImageSpatialObject2.h:88
itk::ImageSpatialObject2::ImageSpatialObject2
ImageSpatialObject2()
itk::ImageSpatialObject2::ImageType
Image< PixelType, TDimension > ImageType
Definition: itkImageSpatialObject2.h:75
itk::ImageSpatialObject2::m_PixelType
std::string m_PixelType
Definition: itkImageSpatialObject2.h:160
itk::ImageSpatialObject2::ScalarType
double ScalarType
Definition: itkImageSpatialObject2.h:68
itk::ImageSpatialObject2::InterpolatorType
InterpolateImageFunction< ImageType > InterpolatorType
Definition: itkImageSpatialObject2.h:83
itk::ImageSpatialObject2::PointType
Superclass::PointType PointType
Definition: itkImageSpatialObject2.h:81
itk::ImageSpatialObject2::IsEvaluableAt
bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=NULL) const
itk::ImageSpatialObject2::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::ImageSpatialObject2::IndexType
ImageType::IndexType IndexType
Definition: itkImageSpatialObject2.h:77
itk::ImageSpatialObject2::ValueAt
bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=NULL) const
itk::ImageSpatialObject2::GetPixelType
const char * GetPixelType()
Definition: itkImageSpatialObject2.h:136
itk::ImageSpatialObject2::IsInside
bool IsInside(const PointType &point) const
itk::ImageSpatialObject2::BoundingBoxType
Superclass::BoundingBoxType BoundingBoxType
Definition: itkImageSpatialObject2.h:82
itk::ImageSpatialObject2::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkImageSpatialObject2.h:72
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::ImageSpatialObject2::GetMTime
unsigned long GetMTime(void) const
itk::ImageSpatialObject2::PixelType
TPixelType PixelType
Definition: itkImageSpatialObject2.h:74
itk::ImageSpatialObject2::ComputeLocalBoundingBox
bool ComputeLocalBoundingBox() const
itk::ImageSpatialObject2::Self
ImageSpatialObject2< TDimension, TPixelType > Self
Definition: itkImageSpatialObject2.h:69
itk::ImageSpatialObject2::Superclass
SpatialObject< TDimension > Superclass
Definition: itkImageSpatialObject2.h:70
itk::ImageSpatialObject2::m_SlicePosition
int * m_SlicePosition
Definition: itkImageSpatialObject2.h:159
itk::ImageSpatialObject2
Implementation of an image as spatial object.
Definition: itkImageSpatialObject2.h:64
itk::ImageSpatialObject2::operator=
void operator=(const Self &)
itk::ImageSpatialObject2::SetImage
void SetImage(const ImageType *image)
itk::ImageSpatialObject2::m_Image
ImagePointer m_Image
Definition: itkImageSpatialObject2.h:152
itk::ImageSpatialObject2::TransformType
Superclass::TransformType TransformType
Definition: itkImageSpatialObject2.h:80


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo