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

itkBinaryThresholdSpatialFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBinaryThresholdSpatialFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-07 12:04:39 $
00007   Version:   $Revision: 1.9 $
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 __itkBinaryThresholdSpatialFunction_h
00018 #define __itkBinaryThresholdSpatialFunction_h
00019 
00020 #include "itkSpatialFunction.h"
00021 #include "itkImageBase.h"
00022 
00023 namespace itk
00024 {
00025 
00040 template <typename TFunction>
00041 class ITK_EXPORT BinaryThresholdSpatialFunction : 
00042   public SpatialFunction< bool, 
00043                           ::itk::GetImageDimension<TFunction>::ImageDimension, 
00044                           ITK_TYPENAME TFunction::InputType >
00045 {
00046 public:
00048   typedef BinaryThresholdSpatialFunction                       Self;
00049   typedef SpatialFunction< bool, 
00050                            ::itk::GetImageDimension<TFunction>::ImageDimension, 
00051                            ITK_TYPENAME TFunction::InputType > Superclass;
00052   typedef SmartPointer<Self>                                   Pointer;
00053   typedef SmartPointer<const Self>                             ConstPointer;
00054 
00056   itkTypeMacro(BinaryThresholdSpatialFunction, SpatialFunction);
00057 
00059   itkNewMacro( Self );
00060 
00062   typedef typename Superclass::OutputType OutputType;
00063 
00065   typedef typename TFunction::InputType InputType;
00066 
00068   typedef TFunction FunctionType;
00069 
00071   typedef typename TFunction::OutputType FunctionOutputType;
00072 
00074   itkSetMacro( LowerThreshold, FunctionOutputType );
00075   itkGetConstReferenceMacro( LowerThreshold, FunctionOutputType );
00077 
00079   itkSetMacro( UpperThreshold, FunctionOutputType );
00080   itkGetConstReferenceMacro( UpperThreshold, FunctionOutputType );
00082 
00084   itkSetObjectMacro( Function, FunctionType );
00085   itkGetConstObjectMacro( Function, FunctionType );
00087 
00089   virtual OutputType Evaluate( const InputType& point ) const;
00090 
00091 protected:
00092 
00093   BinaryThresholdSpatialFunction();
00094   ~BinaryThresholdSpatialFunction();
00095   void PrintSelf(std::ostream& os, Indent indent) const;
00096 
00097   FunctionOutputType                m_LowerThreshold;
00098   FunctionOutputType                m_UpperThreshold;
00099   typename FunctionType::Pointer    m_Function;
00100 
00101 private:
00102   BinaryThresholdSpatialFunction( const Self& ); //purposely not implemented
00103   void operator=( const Self& ); //purposely not implemented
00104 
00105 };
00106 
00107 } // end namespace itk
00108 
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "itkBinaryThresholdSpatialFunction.txx"
00111 #endif
00112 
00113 #endif
00114 

Generated at Tue Sep 15 02:21:00 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000