ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkPCAShapeSignedDistanceFunction.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 __itkPCAShapeSignedDistanceFunction_h
19 #define __itkPCAShapeSignedDistanceFunction_h
20 
22 #include "itkImage.h"
25 #include "itkTransform.h"
26 
27 namespace itk
28 {
65 template< typename TCoordRep,
66  unsigned int VSpaceDimension,
67  typename TImage = Image< double, VSpaceDimension > >
69  public ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension >
70 {
71 public:
75  TCoordRep, VSpaceDimension > Superclass;
76 
79 
81  itkTypeMacro(PCAShapeSignedDistanceFunction, ShapeSignedDistancFunction);
82 
84  itkNewMacro(Self);
85 
87  itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
88 
91 
93  typedef typename Superclass::InputType InputType;
94 
97 
99  typedef typename Superclass::PointType PointType;
100 
103 
105  typedef TImage ImageType;
106  typedef typename ImageType::Pointer ImagePointer;
107  typedef std::vector< ImagePointer > ImagePointerVector;
108 
110  typedef Transform< CoordRepType,
111  itkGetStaticConstMacro(SpaceDimension),
112  itkGetStaticConstMacro(SpaceDimension) > TransformType;
113 
117  typedef std::vector< InterpolatorPointer > InterpolatorPointerVector;
118 
122  typedef std::vector< ExtrapolatorPointer > ExtrapolatorPointerVector;
123 
127  typedef std::vector< FunctionPointer > FunctionPointerVector;
128 
131  void SetNumberOfPrincipalComponents(unsigned int n);
132 
133  itkGetConstMacro(NumberOfPrincipalComponents, unsigned int);
134 
136  itkSetObjectMacro(MeanImage, ImageType);
137  itkGetModifiableObjectMacro(MeanImage, ImageType);
139 
143 // ImagePointerVector & GetPrincipalComponentImages()
144 // { return m_PrincipalComponentImages; }
146 
149  itkSetMacro(PrincipalComponentStandardDeviations, ParametersType);
150  itkGetConstMacro(PrincipalComponentStandardDeviations, ParametersType);
152 
154  itkSetObjectMacro(Transform, TransformType);
155  itkGetModifiableObjectMacro(Transform, TransformType);
157 
159  virtual void SetParameters(const ParametersType &);
160 
161  virtual unsigned int GetNumberOfShapeParameters(void) const
163  virtual unsigned int GetNumberOfPoseParameters(void) const
164  { return m_Transform ? m_Transform->GetNumberOfParameters() : 0; }
165 
167  virtual OutputType Evaluate(const PointType & point) const;
168 
171  virtual void Initialize()
172  throw ( ExceptionObject );
173 
174 protected:
176  ~PCAShapeSignedDistanceFunction(){}
177 
178  void PrintSelf(std::ostream & os, Indent indent) const;
179 
180 private:
181  PCAShapeSignedDistanceFunction(const Self &); //purposely not implemented
182  void operator=(const Self &); //purposely not implemented
183 
187 
191 
194 
198 
202 };
203 } // end namespace itk
204 
205 #ifndef ITK_MANUAL_INSTANTIATION
206 #include "itkPCAShapeSignedDistanceFunction.hxx"
207 #endif
208 
209 #endif
ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension > Superclass
Light weight base class for most itk classes.
virtual unsigned int GetNumberOfShapeParameters(void) const
InterpolateImageFunction< ImageType, CoordRepType > InterpolatorType
Compute the signed distance from a N-dimensional PCA Shape.
virtual unsigned int GetNumberOfPoseParameters(void) const
OptimizerParameters< double > ParametersType
Base class for functions which evaluates the signed distance from a shape.
ImageFunction< ImageType, double, CoordRepType > FunctionType
Transform< CoordRepType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SpaceDimension) > TransformType
virtual OutputType Evaluate(const PointType &point) const
void PrintSelf(std::ostream &os, Indent indent) const
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
std::vector< InterpolatorPointer > InterpolatorPointerVector
void SetNumberOfPrincipalComponents(unsigned int n)
Standard exception handling object.
ExtrapolateImageFunction< ImageType, CoordRepType > ExtrapolatorType
Base class for all image interpolaters.
Base class for all image extrapolaters.
virtual void SetParameters(const ParametersType &)
std::vector< ExtrapolatorPointer > ExtrapolatorPointerVector
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Evaluates a function of an image at specified position.