Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkFastSelectVisiblePoints.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was centerally developed by Kyle Sunderland, PerkLab, Queen's University
16  and was supported through CANARIE's Research Software Program, Cancer
17  Care Ontario, OpenAnatomy, and Brigham and Women's Hospital through NIH grant R01MH112748.
18 
19 ==============================================================================*/
50 #ifndef vtkFastSelectVisiblePoints_h
51 #define vtkFastSelectVisiblePoints_h
52 
53 #include "vtkSelectVisiblePoints.h"
54 #include "vtkSlicerMarkupsModuleVTKWidgetsExport.h"
55 
56 #include <vtkFloatArray.h>
57 
58 class VTK_SLICER_MARKUPS_MODULE_VTKWIDGETS_EXPORT vtkFastSelectVisiblePoints : public vtkSelectVisiblePoints
59 {
60 public:
61  vtkTypeMacro(vtkFastSelectVisiblePoints, vtkSelectVisiblePoints);
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
68  static vtkFastSelectVisiblePoints* New();
69 
70  void UpdateZBuffer();
71  void ResetZBuffer();
72 
73  vtkFloatArray* GetZBuffer() { return this->ZBuffer; };
74  void SetZBuffer(vtkFloatArray* zBuffer) { this->ZBuffer = zBuffer; };
75 
76 protected:
78  ~vtkFastSelectVisiblePoints() override;
79 
80  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
81 
82  vtkSmartPointer<vtkFloatArray> ZBuffer;
83 
84 private:
86  void operator=(const vtkFastSelectVisiblePoints&) = delete;
87 };
88 
89 #endif
void SetZBuffer(vtkFloatArray *zBuffer)
vtkSmartPointer< vtkFloatArray > ZBuffer
extract points that are visible (based on z-buffer calculation)