vtkbone
vtkboneImageConnectivityFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Copyright 2010-2016, Numerics88 Solutions Ltd.
4 http://www.numerics88.com/
5
6 Copyright (c) Eric Nodwell and Steven K. Boyd
7 See Copyright.txt for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12=========================================================================*/
13
28#ifndef __vtkboneImageConnectivityFilter_h
29#define __vtkboneImageConnectivityFilter_h
30
32#include "vtkboneWin32Header.h"
33
34// forward declarations
36class vtkIdList;
37class vtkIdTypeArray;
38
40{
41public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
47 // These match the defines in vtkConnectivityFilter
49 EXTRACT_SEEDED_REGIONS = 2,
50 EXTRACT_SPECIFIED_REGIONS = 3,
51 EXTRACT_LARGEST_REGION = 4,
52 EXTRACT_ALL_REGIONS = 5,
53 EXTRACT_CLOSEST_POINT_REGION = 6,
54 EXTRACT_REGIONS_OF_SPECIFIED_SIZE = 7
55 };
56
58
60 vtkSetClampMacro(ExtractionMode,int,
61 EXTRACT_SEEDED_REGIONS,EXTRACT_REGIONS_OF_SPECIFIED_SIZE);
62 vtkGetMacro(ExtractionMode,int);
64 {this->SetExtractionMode(EXTRACT_SEEDED_REGIONS);};
66 {this->SetExtractionMode(EXTRACT_LARGEST_REGION);};
68 {this->SetExtractionMode(EXTRACT_SPECIFIED_REGIONS);};
70 {this->SetExtractionMode(EXTRACT_CLOSEST_POINT_REGION);};
72 {this->SetExtractionMode(EXTRACT_ALL_REGIONS);};
74 {this->SetExtractionMode(EXTRACT_REGIONS_OF_SPECIFIED_SIZE);};
77
80
83
86
89
91 void AddSpecifiedRegion(int id);
92
95
97
99 vtkSetVector3Macro(ClosestPoint,double);
100 vtkGetVectorMacro(ClosestPoint,double,3);
102
104
106 vtkSetMacro(MinimumRegionSize,vtkIdType);
107 vtkGetMacro(MinimumRegionSize,vtkIdType);
109
111
112 vtkGetMacro(NumberOfExtractedRegions,unsigned int);
114
115protected:
118
121 vtkInformationVector *) override;
122
123 virtual void SimpleExecute(vtkImageData*, vtkImageData*) override;
124
126 vtkUnsignedIntArray* cmap_data,
127 unsigned int numRegions,
128 vtkIdTypeArray* regionSizes);
129
130 int ExtractionMode; //how to extract regions
131 vtkIdList *Seeds; //id's of points or cells used to seed regions
132 vtkIdList *SpecifiedRegionIds; //regions specified for extraction
133 double ClosestPoint[3];
135
137
138private:
139 // Prevent compiler from making default versions of these.
142};
143
144#endif
void operator=(const vtkObjectBase &)
mask regions of image data based on geometric connectivity
static vtkboneImageConnectivityFilter * New()
int CalculateRegionSizes(vtkUnsignedIntArray *cmap_data, unsigned int numRegions, vtkIdTypeArray *regionSizes)
void PrintSelf(ostream &os, vtkIndent indent) override
void DeleteSeed(vtkIdType id)
void AddSeed(vtkIdType id)
virtual void SimpleExecute(vtkImageData *, vtkImageData *) override
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const char * GetExtractionModeAsString()
int vtkIdType