-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkSelectCellsFilter.h
70 lines (48 loc) · 2.21 KB
/
vtkSelectCellsFilter.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
/*=========================================================================
Program: Visualization Toolkit
Module: vtkSelectCellsFilter.h
Language: C++
Version: $Id$
Copyright (c) Goodwin Lawlor 2004
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 vtkSelectCellsFilter- actually remove a cell from a vtkPolyData object
// .SECTION Description
// vtkSelectCellsFilter allows you to mark cells (be they polygons, lines etc.) that will be exclusively
// passed to the output of the filter by removing the unmarked cells.
// .SECTION Thanks
// Goodwin Lawlor, University College Dublin
#ifndef __vtkSelectCellsFilter_h
#define __vtkSelectCellsFilter_h
#include "vtkCellsFilter.h"
#include "vtkBioengConfigure.h" // Include configuration header.
class vtkLookupTable;
class VTK_BIOENG_EXPORT vtkSelectCellsFilter : public vtkCellsFilter
{
public:
// Description:
// Constructs with initial values of zero.
static vtkSelectCellsFilter *New();
vtkTypeMacro(vtkSelectCellsFilter, vtkCellsFilter);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Remove everything but the cells marked by MarkCell(cellid) or ToggleCells(cellid)
void RemoveUnmarkedCells();
// Description:
// Undo all the remove operations
void UndoRemoveCells(){this->Initialize(); this->Modified();}
// Desciption:
// Get the number of cells that have been removed. GetNumberOfDeletedCells should be depreciated.
int GetNumberOfDeletedCells(){return this->GetPolyDataInput(0)->GetNumberOfCells() - vtkPolyData::SafeDownCast(this->GetOutput())->GetNumberOfCells();}
int GetNumberOfRemovedCells(){return this->GetPolyDataInput(0)->GetNumberOfCells() - vtkPolyData::SafeDownCast(this->GetOutput())->GetNumberOfCells();}
protected:
vtkSelectCellsFilter(){};
~vtkSelectCellsFilter(){};
private:
vtkSelectCellsFilter(const vtkSelectCellsFilter&); // Not implemented.
void operator=(const vtkSelectCellsFilter&); // Not implemented.
};
#endif