KWStyle - itkInteriorExteriorSpatialFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkInteriorExteriorSpatialFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:40 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkInteriorExteriorSpatialFunction_h
18 #define __itkInteriorExteriorSpatialFunction_h
19
20 #include "itkSpatialFunction.h"
21
22 namespace itk
23 {
24
25 /** \class InteriorExteriorSpatialFunction
26  * \brief Returns whether or not a location is "inside" or "outside" a function
27  *
28  * InteriorExteriorSpatialFunction is a specialized version of SpatialFunction
29 LEN  * where the output type is a boolean. In particular, the return type is understood
30  * to mean the following:
31  *
32  * A return of 1 means inside or on the surface of the function,
33  * 0 means outside the function
34  *
35  * There is no implied meaning in the terms "inside" or "outside"; although
36  * the standard assumption is that "inside" means "bounded by a closed surface",
37  * alternative definitions are also fine. For example, inside might be one side
38  * of a plane, outside the other side.
39  *
40  * A typical use for an InteriorExteriorSpatialFunction is to generate test
41  * primitives of arbitrary dimensionality, in conjunction with
42 LEN  * itk::SpatialFunctionImageEvaluatorFilter or itk::FloodFilledSpatialFunctionConditionalIterator
43  *
44  * \ingroup SpatialFunctions
45  */
46
47 template <unsigned int VDimension=3,typename TInput=Point<double,VDimension> >
48 class ITK_EXPORT InteriorExteriorSpatialFunction : public
49 IND **SpatialFunction<bool, VDimension, TInput >
50 {
51 public:
52   /** Standard class typedefs. */
53   typedef InteriorExteriorSpatialFunction Self;
54 TDA   typedef SpatialFunction<bool, VDimension,TInput> Superclass;
55 TDA   typedef SmartPointer<Self>  Pointer;
56 TDA   typedef SmartPointer<const Self>  ConstPointer;
57   
58   /** Run-time type information (and related methods). */
59   itkTypeMacro(InteriorExteriorSpatialFunction, SpatialFunction);
60
61   /** Input type for the function */
62   typedef typename Superclass::InputType InputType;
63
64   /** Output type for the function */
65   typedef typename Superclass::OutputType OutputType;
66   
67 IND */** Evaluate the function at a given position.
68 IND *** A return of 1 means inside or on the surface of the function,
69 IND *** 0 means outside the function
70 IND *** The actual definition of inside/outside is left up to the subclass */
71   virtual OutputType Evaluate( const InputType& input ) const = 0;
72
73 protected:
74   InteriorExteriorSpatialFunction();
75   virtual ~InteriorExteriorSpatialFunction();
76   void PrintSelf(std::ostream& os, Indent indent) const;
77
78 private:
79   InteriorExteriorSpatialFunction(const Self&); //purposely not implemented
80   void operator=(const Self&); //purposely not implemented
81   
82 };
83
84 // end namespace itk
85
86 #ifndef ITK_MANUAL_INSTANTIATION
87 #include "itkInteriorExteriorSpatialFunction.txx"
88 #endif
89
90 #endif
91

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:17PM
© Kitware Inc.