VTK
vtkImageConnector.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageConnector.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkImageConnector_h
30 #define vtkImageConnector_h
31 
32 #include "vtkImagingMorphologicalModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 class vtkImageData;
36 
37 //
38 // Special classes for manipulating data
39 //
40 // For the breadth first search
41 class vtkImageConnectorSeed { //;prevent man page generation
42 public:
44  void *Pointer;
45  int Index[3];
47 };
48 
49 
50 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageConnector : public vtkObject
51 {
52 public:
53  static vtkImageConnector *New();
54 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
58  vtkImageConnectorSeed *NewSeed(int index[3], void *ptr);
59  void AddSeed(vtkImageConnectorSeed *seed);
60  void AddSeedToEnd(vtkImageConnectorSeed *seed);
61 
62  void RemoveAllSeeds();
63 
65 
68  vtkSetMacro(ConnectedValue, unsigned char);
69  vtkGetMacro(ConnectedValue, unsigned char);
70  vtkSetMacro(UnconnectedValue, unsigned char);
71  vtkGetMacro(UnconnectedValue, unsigned char);
73 
74 
80  void MarkData(vtkImageData *data, int dimensionality, int ext[6]);
81 
82 
83 protected:
85  ~vtkImageConnector() override;
86 
87  unsigned char ConnectedValue;
88  unsigned char UnconnectedValue;
89 
90  vtkImageConnectorSeed *PopSeed();
91 
94 private:
95  vtkImageConnector(const vtkImageConnector&) = delete;
96  void operator=(const vtkImageConnector&) = delete;
97 };
98 
99 
100 
101 #endif
102 
103 
Create a binary image of a sphere.
abstract base class for most VTK objects
Definition: vtkObject.h:59
unsigned char ConnectedValue
static vtkImageConnectorSeed * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkImageConnectorSeed * LastSeed
vtkImageConnectorSeed * Next
unsigned char UnconnectedValue
vtkImageConnectorSeed * Seeds