ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkThresholdSegmentationLevelSetImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkThresholdSegmentationLevelSetImageFilter_h
00019 #define __itkThresholdSegmentationLevelSetImageFilter_h
00020 
00021 #include "itkSegmentationLevelSetImageFilter.h"
00022 #include "itkThresholdSegmentationLevelSetFunction.h"
00023 
00024 namespace itk
00025 {
00083 template< class TInputImage,
00084           class TFeatureImage,
00085           class TOutputPixelType = float >
00086 class ITK_EXPORT ThresholdSegmentationLevelSetImageFilter:
00087   public SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
00088 {
00089 public:
00091   typedef ThresholdSegmentationLevelSetImageFilter Self;
00092   typedef  SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
00093   Superclass;
00094   typedef SmartPointer< Self >       Pointer;
00095   typedef SmartPointer< const Self > ConstPointer;
00096 
00098   typedef typename Superclass::ValueType        ValueType;
00099   typedef typename Superclass::OutputImageType  OutputImageType;
00100   typedef typename Superclass::FeatureImageType FeatureImageType;
00101 
00103   typedef ThresholdSegmentationLevelSetFunction< OutputImageType,
00104                                                  FeatureImageType > ThresholdFunctionType;
00105   typedef typename ThresholdFunctionType::Pointer ThresholdFunctionPointer;
00106 
00108   itkTypeMacro(ThresholdSegmentationLevelSetImageFilter, SegmentationLevelSetImageFilter);
00109 
00111   itkNewMacro(Self);
00112 
00115   void SetUpperThreshold(ValueType v)
00116   {
00117     this->m_ThresholdFunction->SetUpperThreshold(v);
00118     this->Modified();
00119   }
00121 
00122   void SetLowerThreshold(ValueType v)
00123   {
00124     this->m_ThresholdFunction->SetLowerThreshold(v);
00125     this->Modified();
00126   }
00127 
00128   ValueType GetUpperThreshold() const
00129   {
00130     return m_ThresholdFunction->GetUpperThreshold();
00131   }
00132 
00133   ValueType GetLowerThreshold() const
00134   {
00135     return m_ThresholdFunction->GetLowerThreshold();
00136   }
00137 
00140   void SetEdgeWeight(ValueType v)
00141   {
00142     this->m_ThresholdFunction->SetEdgeWeight(v);
00143     this->Modified();
00144   }
00146 
00147   ValueType GetEdgeWeight() const
00148   {
00149     return m_ThresholdFunction->GetEdgeWeight();
00150   }
00151 
00155   void SetSmoothingIterations(int v)
00156   {
00157     this->m_ThresholdFunction->SetSmoothingIterations(v);
00158     this->Modified();
00159   }
00161 
00162   int GetSmoothingIterations() const
00163   {
00164     return m_ThresholdFunction->GetSmoothingIterations();
00165   }
00166 
00170   void SetSmoothingTimeStep(ValueType v)
00171   {
00172     this->m_ThresholdFunction->SetSmoothingTimeStep(v);
00173     this->Modified();
00174   }
00176 
00177   ValueType GetSmoothingTimeStep() const
00178   {
00179     return m_ThresholdFunction->GetSmoothingTimeStep();
00180   }
00181 
00185   void SetSmoothingConductance(ValueType v)
00186   {
00187     this->m_ThresholdFunction->SetSmoothingConductance(v);
00188     this->Modified();
00189   }
00191 
00192   ValueType GetSmoothingConductance() const
00193   {
00194     return m_ThresholdFunction->GetSmoothingConductance();
00195   }
00196 
00197 protected:
00198   ~ThresholdSegmentationLevelSetImageFilter() {}
00199   ThresholdSegmentationLevelSetImageFilter();
00200 
00201   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00202 
00203   ThresholdSegmentationLevelSetImageFilter(const Self &); // purposely not impl.
00204   void operator=(const Self &);                           //purposely not
00205                                                           // implemented
00206 
00207 private:
00208   ThresholdFunctionPointer m_ThresholdFunction;
00209 };
00210 } // end namespace itk
00211 
00212 #ifndef ITK_MANUAL_INSTANTIATION
00213 #include "itkThresholdSegmentationLevelSetImageFilter.hxx"
00214 #endif
00215 
00216 #endif
00217