KWStyle - itkSegmentationRegion.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkSegmentationRegion.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:47 $
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 DEF #ifndef _itkSegmentationRegion_h
18 DEF #define _itkSegmentationRegion_h
19
20 #include "itkObject.h"
21 #include "itkObjectFactory.h"
22
23 namespace itk
24 {
25
26 /** \class SegmentationRegion
27  * \brief Base class for SegmentationRegion object
28  *
29  * itkSegmentationRegion is the base class for the SegmentationRegion
30  * objects. It provides the basic function definitons that are inherent to a
31  * SegmentationRegion objects.  A region object is defined by the label it
32  * owns.  We use integer labels to represent a region.
33  * This object stores the region label.  The user can get the
34  * area and a label associated with the region
35  * through access functions provided publicly.
36  * This class provides an interface method called
37  * ApplySegmentationRegion is defined as virtual to enable future extension
38  * of the region object.
39  * This object can be used where region in images needs to be defined.
40  * Child classes can be derived from this class for tailoring them towards
41  * specific algorithmic needs.
42  *
43  * \ingroup RegionGrowingSegmentation
44  */
45 class ITKCommon_EXPORT SegmentationRegion : public Object
46 {
47 public:
48   /** Standard class typedefs. */
49   typedef SegmentationRegion       Self;
50   typedef Object                   Superclass;
51   typedef SmartPointer<Self>       Pointer;
52   typedef SmartPointer<const Self> ConstPointer;
53
54   /** Method for creation through the object factory. */
55   itkNewMacro(Self);
56
57   /** Run-time type information (and related methods). */
58   itkTypeMacro(SegmentationRegion,Object);
59
60   /** Type definition for a segmentation region label. */
61   typedef unsigned int RegionLabelType;
62
63   /** Define a virtual SegmentationRegion function that is meant to be
64    * used in derived classes if some operation needs to be
65    * performed on a region object. */
66   virtual void ApplySegmentationRegion(){};
67
68   /** Set/Get the region with parameter values
69    * defining the region. */
70   itkSetMacro(RegionLabel, RegionLabelType);
71   itkGetConstReferenceMacro(RegionLabel, RegionLabelType);
72
73   /** Set/Get the area of the region. */
74   itkSetMacro(RegionArea, double);
75   itkGetConstReferenceMacro(RegionArea, double);
76
77 protected:
78   SegmentationRegion();
79   ~SegmentationRegion();
80   void PrintSelf(std::ostream& os, Indent indent) const;
81
82 private:
83   SegmentationRegion(const Self&); //purposely not implemented
84   void operator=(const Self&); //purposely not implemented
85
86   RegionLabelType           m_RegionLabel;
87   double                    m_RegionArea;
88
89 }; // class SegmentationRegion
90
91
92 // namespace itk
93
94
95 #endif
96

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