ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkCannySegmentationLevelSetImageFilter.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 __itkCannySegmentationLevelSetImageFilter_h
00019 #define __itkCannySegmentationLevelSetImageFilter_h
00020 
00021 #include "itkSegmentationLevelSetImageFilter.h"
00022 #include "itkCannySegmentationLevelSetFunction.h"
00023 
00024 namespace itk
00025 {
00129 template< class TInputImage,
00130           class TFeatureImage,
00131           class TOutputPixelType = float >
00132 class ITK_EXPORT CannySegmentationLevelSetImageFilter:
00133   public SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
00134 {
00135 public:
00137   typedef CannySegmentationLevelSetImageFilter Self;
00138   typedef  SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >
00139   Superclass;
00140   typedef SmartPointer< Self >       Pointer;
00141   typedef SmartPointer< const Self > ConstPointer;
00142 
00144   typedef typename Superclass::ValueType        ValueType;
00145   typedef typename Superclass::OutputImageType  OutputImageType;
00146   typedef typename Superclass::FeatureImageType FeatureImageType;
00147   typedef typename Superclass::VectorImageType  VectorImageType;
00148   typedef typename Superclass::SpeedImageType   SpeedImageType;
00149 
00151   typedef::itk::CannySegmentationLevelSetFunction< OutputImageType,
00152                                                    FeatureImageType > CannyFunctionType;
00153 
00154   typedef typename CannyFunctionType::ScalarValueType ScalarValueType;
00155 
00157   itkTypeMacro(CannySegmentationLevelSetImageFilter, SegmentationLevelSetImageFilter);
00158 
00160   itkNewMacro(Self);
00161 
00164   void SetThreshold(ScalarValueType v)
00165   { this->m_CannyFunction->SetThreshold(v); }
00166   ScalarValueType GetThreshold() const
00167   { return this->m_CannyFunction->GetThreshold(); }
00169 
00172   void SetVariance(double v)
00173   { this->m_CannyFunction->SetVariance(v); }
00174   double GetVariance() const
00175   { return this->m_CannyFunction->GetVariance(); }
00177 
00180   OutputImageType * GetCannyImage(void)
00181   { return this->m_CannyFunction->GetCannyImage(); }
00182 
00183 #ifdef ITK_USE_CONCEPT_CHECKING
00184 
00185   itkConceptMacro( OutputHasNumericTraitsCheck,
00186                    ( Concept::HasNumericTraits< TOutputPixelType > ) );
00187 
00189 #endif
00190 protected:
00191   ~CannySegmentationLevelSetImageFilter() {}
00192   CannySegmentationLevelSetImageFilter();
00193 private:
00194   CannySegmentationLevelSetImageFilter(const Self &); //purposely not
00195                                                       // implemented
00196   void operator=(const Self &);                       //purposely not
00197                                                       // implemented
00199 
00200   typename CannyFunctionType::Pointer m_CannyFunction;
00201 };
00202 } // end namespace itk
00203 
00204 #ifndef ITK_MANUAL_INSTANTIATION
00205 #include "itkCannySegmentationLevelSetImageFilter.hxx"
00206 #endif
00207 
00208 #endif
00209