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: 2004/11/04 20:40:40 $
00007   Version:   $Revision: 1.5 $
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 );
00076 
00078   itkSetMacro( UpperThreshold, FunctionOutputType );
00079   itkGetConstReferenceMacro( UpperThreshold, FunctionOutputType );
00080 
00082   itkSetObjectMacro( Function, FunctionType );
00083   itkGetConstObjectMacro( Function, FunctionType );
00084 
00086   virtual OutputType Evaluate( const InputType& point ) const;
00087 
00088 protected:
00089 
00090   BinaryThresholdSpatialFunction();
00091   ~BinaryThresholdSpatialFunction();
00092   void PrintSelf(std::ostream& os, Indent indent) const;
00093 
00094   FunctionOutputType                m_LowerThreshold;
00095   FunctionOutputType                m_UpperThreshold;
00096   typename FunctionType::Pointer    m_Function;
00097 
00098 private:
00099   BinaryThresholdSpatialFunction( const Self& ); //purposely not implemented
00100   void operator=( const Self& ); //purposely not implemented
00101 
00102 };
00103 
00104 } // namespace itk
00105 
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkBinaryThresholdSpatialFunction.txx"
00108 #endif
00109 
00110 #endif

Generated at Wed May 24 22:50:58 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000