Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkImageFillROI.h
Go to the documentation of this file.
1/*=auto=========================================================================
2
3 Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8=========================================================================auto=*/
20//
21
22#ifndef __vtkImageFillROI_h
23#define __vtkImageFillROI_h
24
25#include "vtkSlicerBaseLogic.h"
26
27// VTK includes
28#include <vtkImageAlgorithm.h>
29
30#define SHAPE_POLYGON 1
31#define SHAPE_LINES 2
32#define SHAPE_POINTS 3
33
34class vtkPoints;
35
36class VTK_SLICER_BASE_LOGIC_EXPORT vtkImageFillROI : public vtkImageAlgorithm
37{
38public:
40 vtkTypeMacro(vtkImageFillROI,vtkImageAlgorithm);
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 vtkSetMacro(Value, double);
44 vtkGetMacro(Value, double);
45
49 void SetShape(int s) {this->Shape = s;};
50 int GetShape() {return this->Shape;};
51
52 const char *GetShapeString()
53 {
54 switch (this->Shape)
55 {
56 case SHAPE_POLYGON:
57 return "Polygon";
58 case SHAPE_LINES:
59 return "Lines";
60 case SHAPE_POINTS:
61 return "Points";
62 default:
63 return "None";
64 }
65 }
66
67 void SetShapeString(const char *str) {
68 if (strcmp(str,"Polygon") == 0)
69 this->SetShapeToPolygon();
70 else if (strcmp(str,"Lines") == 0)
71 this->SetShapeToLines();
72 else
73 this->SetShapeToPoints();
74 }
75
76 vtkSetMacro(Radius, int);
77 vtkGetMacro(Radius, int);
78
79 virtual void SetPoints(vtkPoints*);
80 vtkGetObjectMacro(Points, vtkPoints);
81
82protected:
84 ~vtkImageFillROI() override;
85
86 vtkPoints *Points;
87 double Value;
88 int Radius;
89 int Shape;
90
93 int RequestData(vtkInformation* request,
94 vtkInformationVector** inputVectors,
95 vtkInformationVector* outputVector) override;
96
97private:
98 vtkImageFillROI(const vtkImageFillROI&) = delete;
99 void operator=(const vtkImageFillROI&) = delete;
100};
101
102#endif
virtual void SetPoints(vtkPoints *)
int RequestData(vtkInformation *request, vtkInformationVector **inputVectors, vtkInformationVector *outputVector) override
~vtkImageFillROI() override
static vtkImageFillROI * New()
vtkPoints * Points
void SetShape(int s)
const char * GetShapeString()
void PrintSelf(ostream &os, vtkIndent indent) override
void SetShapeString(const char *str)
#define SHAPE_POINTS
#define SHAPE_LINES
#define SHAPE_POLYGON