ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGeodesicActiveContourLevelSetImageFilter.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 __itkGeodesicActiveContourLevelSetImageFilter_h
00019 #define __itkGeodesicActiveContourLevelSetImageFilter_h
00020 
00021 #include "itkSegmentationLevelSetImageFilter.h"
00022 #include "itkGeodesicActiveContourLevelSetFunction.h"
00023 
00024 namespace itk
00025 {
00104 template< class TInputImage,
00105           class TFeatureImage,
00106           class TOutputPixelType = float >
00107 class ITK_EXPORT GeodesicActiveContourLevelSetImageFilter:
00108   public SegmentationLevelSetImageFilter< TInputImage, TFeatureImage,
00109                                           TOutputPixelType >
00110 {
00111 public:
00113   typedef GeodesicActiveContourLevelSetImageFilter Self;
00114   typedef SegmentationLevelSetImageFilter< TInputImage, TFeatureImage,
00115                                            TOutputPixelType > Superclass;
00116 
00117   typedef SmartPointer< Self >       Pointer;
00118   typedef SmartPointer< const Self > ConstPointer;
00119 
00121   typedef typename Superclass::ValueType        ValueType;
00122   typedef typename Superclass::OutputImageType  OutputImageType;
00123   typedef typename Superclass::FeatureImageType FeatureImageType;
00124 
00126   typedef GeodesicActiveContourLevelSetFunction< OutputImageType,
00127                                                  FeatureImageType > GeodesicActiveContourFunctionType;
00128   typedef typename GeodesicActiveContourFunctionType::Pointer GeodesicActiveContourFunctionPointer;
00129 
00131   itkTypeMacro(GeodesicActiveContourLevelSetImageFilter, SegmentationLevelSetImageFilter);
00132 
00134   itkNewMacro(Self);
00135 
00138   void SetDerivativeSigma(float value)
00139   {
00140     if ( value != m_GeodesicActiveContourFunction->GetDerivativeSigma() )
00141       {
00142       m_GeodesicActiveContourFunction->SetDerivativeSigma(value);
00143       this->Modified();
00144       }
00145   }
00147 
00150   float GetDerivativeSigma() const
00151   { return m_GeodesicActiveContourFunction->GetDerivativeSigma(); }
00152 protected:
00153   ~GeodesicActiveContourLevelSetImageFilter() {}
00154   GeodesicActiveContourLevelSetImageFilter();
00156 
00157   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00158 
00159   GeodesicActiveContourLevelSetImageFilter(const Self &); // purposely not
00160                                                           // implemented
00161   void operator=(const Self &);                           //purposely not
00162 
00163   // implemented
00164 
00167   void GenerateData();
00168 
00169 private:
00170   GeodesicActiveContourFunctionPointer m_GeodesicActiveContourFunction;
00171 };
00172 } // end namespace itk
00173 
00174 #ifndef ITK_MANUAL_INSTANTIATION
00175 #include "itkGeodesicActiveContourLevelSetImageFilter.hxx"
00176 #endif
00177 
00178 #endif
00179