-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvtkImageToROIContourData.h
83 lines (62 loc) · 2.51 KB
/
vtkImageToROIContourData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*=========================================================================
Program: ToolCursor
Module: vtkImageToROIContourData.h
Copyright (c) 2010 David Gobbi
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkImageToROIContourData - Generate ROIContourData from an image
// .SECTION Description
// This filter will contour an image at a specified isovalue to generate
// slice-by-slice ROI contours that will be stored in a vtkROIContourData.
#ifndef __vtkImageToROIContourData_h
#define __vtkImageToROIContourData_h
#include "vtkAlgorithm.h"
class vtkROIContourData;
class vtkImageData;
class vtkPolyData;
class VTK_EXPORT vtkImageToROIContourData : public vtkAlgorithm
{
public:
static vtkImageToROIContourData *New();
vtkTypeMacro(vtkImageToROIContourData,vtkAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// The isovalue for which to generate the contours.
vtkSetMacro(Value, double);
vtkGetMacro(Value, double);
// Description:
// The input to this filter must be a vtkImageData.
void SetInput(vtkDataObject *d);
vtkDataObject *GetInput();
// Description:
// Get the output data object.
vtkROIContourData* GetOutput();
virtual void SetOutput(vtkDataObject* d);
// Description:
// see vtkAlgorithm for details
virtual int ProcessRequest(vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
protected:
vtkImageToROIContourData();
~vtkImageToROIContourData();
virtual int ComputePipelineMTime(
vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector, int requestFromOutputPort,
unsigned long* mtime);
virtual int RequestData(
vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
virtual int FillOutputPortInformation(int port, vtkInformation *info);
virtual int FillInputPortInformation(int port, vtkInformation *info);
double Value;
private:
vtkImageToROIContourData(const vtkImageToROIContourData&); // Not implemented.
void operator=(const vtkImageToROIContourData&); // Not implemented.
void MarchingSquares(
vtkImageData *input, vtkPolyData *output, int extent[6], double value);
};
#endif