GOFIGURE2
0.9.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
Code
Filters
Mesh
Attributes
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"
38
#include "
itkvtkPolyDataToBinaryMaskImageFilter.h
"
39
#include "
itkBinaryMaskImageToGoFigureMeshAttributes.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
:
49
typedef
vtkPolyDataToGoFigureMeshAttributes
Self
;
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
58
itkNewMacro
(
Self
);
59
61
itkTypeMacro
(
vtkPolyDataToGoFigureMeshAttributes
, LightObject);
62
63
typedef
vtkPolyDataToBinaryMaskImageFilter< ImageType, ImageType >
64
PolyDataToBinaryMaskImageFilterType
;
65
typedef
typename
PolyDataToBinaryMaskImageFilterType::Pointer
66
PolyDataToBinaryMaskImageFilterPointer
;
67
68
typedef
BinaryMaskImageToGoFigureMeshAttributes< ImageType, ImageType >
69
BinaryMaskImageToGoFigureMeshAttributesType
;
70
typedef
typename
BinaryMaskImageToGoFigureMeshAttributesType::Pointer
71
BinaryMaskImageToGoFigureMeshAttributesPointer
;
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
:
96
vtkPolyDataToGoFigureMeshAttributes
();
97
~vtkPolyDataToGoFigureMeshAttributes
();
98
99
vtkPolyData *
m_Mesh
;
100
ImagePointer
m_Image
;
101
102
PolyDataToBinaryMaskImageFilterPointer
m_Binarizer
;
103
BinaryMaskImageToGoFigureMeshAttributesPointer
m_AttributeCalculator
;
104
ROIFilterPointer
m_ROIFilter
;
105
106
unsigned
int
m_Size
;
107
double
m_PhysicalSize
;
108
double
m_Area
;
109
double
m_Mean
;
110
double
m_Sum
;
111
bool
m_IntensityComputation
;
112
113
virtual
void
GenerateData
();
114
115
void
ComputeArea
();
116
117
private
:
118
vtkPolyDataToGoFigureMeshAttributes
(
const
Self
&);
119
void
operator=
(
const
Self
&);
120
};
121
}
122
123
#include "itkvtkPolyDataToGoFigureMeshAttributes.txx"
124
#endif
Generated on Mon May 27 2013 08:47:29 for GOFIGURE2 by
1.8.1.2