GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkvtkPolyDataToGoFigureMeshAttributes.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 #ifndef __itkvtkPolyDataToGoFigureMeshAttributes_h
35 #define __itkvtkPolyDataToGoFigureMeshAttributes_h
36 
37 #include "itkLightObject.h"
40 #include "itkRegionOfInterestImageFilter.h"
41 #include "itkImageFileWriter.h"
42 
43 namespace itk
44 {
45 template< class TImage >
46 class vtkPolyDataToGoFigureMeshAttributes:public LightObject
47 {
48 public:
50  typedef LightObject Superclass;
51  typedef SmartPointer< Self > Pointer;
52  typedef SmartPointer< const Self > ConstPointer;
53 
54  typedef TImage ImageType;
55  typedef typename ImageType::Pointer ImagePointer;
56 
59 
62 
67 
72 
73  typedef RegionOfInterestImageFilter< ImageType, ImageType > ROIFilterType;
74  typedef typename ROIFilterType::Pointer ROIFilterPointer;
75 
76  typedef ImageFileWriter< ImageType > WriterType;
77 
78  virtual void SetImage(ImageType *iImage);
79 
80  virtual void SetPolyData(vtkPolyData *iMesh);
81 
82  void SetIntensityBasedComputation( const bool& iComputation );
83  virtual void Update();
84 
85  unsigned int GetSize();
86 
87  double GetPhysicalSize();
88 
89  double GetMeanIntensity();
90 
91  double GetSumIntensity();
92 
93  double GetArea();
94 
95 protected:
98 
99  vtkPolyData *m_Mesh;
101 
105 
106  unsigned int m_Size;
108  double m_Area;
109  double m_Mean;
110  double m_Sum;
112 
113  virtual void GenerateData();
114 
115  void ComputeArea();
116 
117 private:
119  void operator=(const Self &);
120 };
121 }
122 
123 #include "itkvtkPolyDataToGoFigureMeshAttributes.txx"
124 #endif
virtual void SetImage(ImageType *iImage)
virtual void SetPolyData(vtkPolyData *iMesh)
PolyDataToBinaryMaskImageFilterType::Pointer PolyDataToBinaryMaskImageFilterPointer
BinaryMaskImageToGoFigureMeshAttributesPointer m_AttributeCalculator
vtkPolyDataToBinaryMaskImageFilter< ImageType, ImageType > PolyDataToBinaryMaskImageFilterType
BinaryMaskImageToGoFigureMeshAttributes< ImageType, ImageType > BinaryMaskImageToGoFigureMeshAttributesType
Compute Mesh Attributes from a binary mask image.
RegionOfInterestImageFilter< ImageType, ImageType > ROIFilterType
void SetIntensityBasedComputation(const bool &iComputation)
itkTypeMacro(vtkPolyDataToGoFigureMeshAttributes, LightObject)
BinaryMaskImageToGoFigureMeshAttributesType::Pointer BinaryMaskImageToGoFigureMeshAttributesPointer