Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkShapePriorSegmentationLevelSetImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkShapePriorSegmentationLevelSetImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:39 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkShapePriorSegmentationLevelSetImageFilter_h_ 00018 #define __itkShapePriorSegmentationLevelSetImageFilter_h_ 00019 00020 #include "itkSegmentationLevelSetImageFilter.h" 00021 #include "itkShapePriorSegmentationLevelSetFunction.h" 00022 #include "itkSingleValuedNonLinearOptimizer.h" 00023 #include "itkShapePriorMAPCostFunctionBase.h" 00024 00025 namespace itk { 00026 00069 template <class TInputImage, 00070 class TFeatureImage, 00071 class TOutputPixelType = float > 00072 class ITK_EXPORT ShapePriorSegmentationLevelSetImageFilter 00073 : public SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, 00074 TOutputPixelType, Image<TOutputPixelType, 00075 ::itk::GetImageDimension<TInputImage>::ImageDimension> > 00076 { 00077 public: 00078 00080 itkStaticConstMacro(ImageDimension, unsigned int, 00081 TInputImage::ImageDimension); 00082 00084 typedef ShapePriorSegmentationLevelSetImageFilter Self; 00085 typedef SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType, 00086 Image<TOutputPixelType, itkGetStaticConstMacro(ImageDimension)> > Superclass; 00087 typedef SmartPointer<Self> Pointer; 00088 typedef SmartPointer<const Self> ConstPointer; 00089 00091 itkTypeMacro(ShapePriorSegmentationLevelSetImageFilter, SegmentationLevelSetImageFilter); 00092 00094 typedef typename Superclass::ValueType ValueType; 00095 typedef typename Superclass::OutputImageType OutputImageType; 00096 typedef typename Superclass::FeatureImageType FeatureImageType; 00097 00099 typedef TOutputPixelType OutputPixelType; 00100 00102 typedef ShapePriorSegmentationLevelSetFunction<OutputImageType, FeatureImageType> 00103 ShapePriorSegmentationFunctionType; 00104 00106 typedef typename ShapePriorSegmentationFunctionType::ShapeFunctionType 00107 ShapeFunctionType; 00108 typedef typename ShapeFunctionType::Pointer ShapeFunctionPointer; 00109 00111 typedef ShapePriorMAPCostFunctionBase<TFeatureImage,TOutputPixelType> CostFunctionType; 00112 typedef typename CostFunctionType::Pointer CostFunctionPointer; 00113 typedef typename CostFunctionType::ParametersType ParametersType; 00114 00116 typedef typename CostFunctionType::NodeType NodeType; 00117 typedef typename CostFunctionType::NodeContainerType NodeContainerType; 00118 typedef typename NodeContainerType::Pointer NodeContainerPointer; 00119 00121 typedef SingleValuedNonLinearOptimizer OptimizerType; 00122 typedef typename OptimizerType::Pointer OptimizerPointer; 00123 00125 virtual void SetShapeFunction(ShapeFunctionType *s); 00126 itkGetObjectMacro( ShapeFunction, ShapeFunctionType ); 00127 00129 itkSetObjectMacro( CostFunction, CostFunctionType ); 00130 itkGetObjectMacro( CostFunction, CostFunctionType ); 00131 00133 itkSetObjectMacro( Optimizer, OptimizerType ); 00134 itkGetObjectMacro( Optimizer, OptimizerType ); 00135 00137 itkSetMacro( InitialParameters, ParametersType ); 00138 itkGetMacro( InitialParameters, ParametersType ); 00139 00141 void SetShapePriorScaling( ValueType v ) 00142 { 00143 if ( v != m_ShapePriorSegmentationFunction->GetShapePriorWeight() ) 00144 { 00145 m_ShapePriorSegmentationFunction->SetShapePriorWeight( v ); 00146 this->Modified(); 00147 } 00148 } 00149 ValueType GetShapePriorScaling() const 00150 { 00151 return m_ShapePriorSegmentationFunction->GetShapePriorWeight(); 00152 } 00153 00156 virtual void SetShapePriorSegmentationFunction( ShapePriorSegmentationFunctionType * s ); 00157 virtual ShapePriorSegmentationFunctionType * GetShapePriorSegmentationFunction() 00158 { return m_ShapePriorSegmentationFunction; } 00159 00161 itkGetMacro( CurrentParameters, ParametersType ); 00162 00163 protected: 00164 virtual ~ShapePriorSegmentationLevelSetImageFilter() {} 00165 ShapePriorSegmentationLevelSetImageFilter(); 00166 00167 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00168 00171 virtual void InitializeIteration(); 00172 00175 void GenerateData(); 00176 00178 void ExtractActiveRegion( NodeContainerType * ptr ); 00179 00180 private: 00181 00182 ShapeFunctionPointer m_ShapeFunction; 00183 CostFunctionPointer m_CostFunction; 00184 OptimizerPointer m_Optimizer; 00185 ParametersType m_InitialParameters; 00186 ParametersType m_CurrentParameters; 00187 00188 ShapePriorSegmentationFunctionType * m_ShapePriorSegmentationFunction; 00189 00190 }; 00191 00192 } // end namespace itk 00193 00194 #ifndef ITK_MANUAL_INSTANTIATION 00195 #include "itkShapePriorSegmentationLevelSetImageFilter.txx" 00196 #endif 00197 00198 #endif 00199

Generated at Sat Mar 31 02:29:09 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000