VTK
vtkVoxelModeller.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVoxelModeller.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 =========================================================================*/
31 #ifndef vtkVoxelModeller_h
32 #define vtkVoxelModeller_h
33 
34 #include "vtkImagingHybridModule.h" // For export macro
35 #include "vtkImageAlgorithm.h"
36 
37 class VTKIMAGINGHYBRID_EXPORT vtkVoxelModeller : public vtkImageAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
50  static vtkVoxelModeller *New();
51 
55  double ComputeModelBounds(double origin[3], double ar[3]);
56 
58 
62  void SetSampleDimensions(int i, int j, int k);
63  void SetSampleDimensions(int dim[3]);
64  vtkGetVectorMacro(SampleDimensions,int,3);
66 
68 
72  vtkSetClampMacro(MaximumDistance,double,0.0,1.0);
73  vtkGetMacro(MaximumDistance,double);
75 
77 
81  void SetModelBounds(const double bounds[6]);
82  void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
83  vtkGetVectorMacro(ModelBounds,double,6);
85 
87 
93  vtkSetMacro(ScalarType,int);
94  void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);};
95  void SetScalarTypeToDouble(){this->SetScalarType(VTK_DOUBLE);};
96  void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);};
98  {this->SetScalarType(VTK_UNSIGNED_INT);};
99  void SetScalarTypeToLong(){this->SetScalarType(VTK_LONG);};
101  {this->SetScalarType(VTK_UNSIGNED_LONG);};
102  void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);};
104  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
106  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
108  {this->SetScalarType(VTK_CHAR);};
110  {this->SetScalarType(VTK_BIT);};
111  vtkGetMacro(ScalarType,int);
113 
115 
122  vtkSetMacro(ForegroundValue, double);
123  vtkGetMacro(ForegroundValue, double);
124  vtkSetMacro(BackgroundValue, double);
125  vtkGetMacro(BackgroundValue, double);
127 
128 protected:
130  ~vtkVoxelModeller() override {}
131 
134  vtkInformationVector *) override;
135 
136  // see vtkAlgorithm for details
137  int RequestData(vtkInformation *request,
138  vtkInformationVector** inputVector,
139  vtkInformationVector* outputVector) override;
140 
141  // see algorithm for more info
142  int FillInputPortInformation(int port, vtkInformation* info) override;
143 
144  int SampleDimensions[3];
146  double ModelBounds[6];
150 
151 private:
152  vtkVoxelModeller(const vtkVoxelModeller&) = delete;
153  void operator=(const vtkVoxelModeller&) = delete;
154 };
155 
156 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkVoxelModeller::SetScalarTypeToUnsignedInt
void SetScalarTypeToUnsignedInt()
Definition: vtkVoxelModeller.h:97
vtkVoxelModeller::ScalarType
int ScalarType
Definition: vtkVoxelModeller.h:149
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkVoxelModeller::SetScalarTypeToUnsignedShort
void SetScalarTypeToUnsignedShort()
Definition: vtkVoxelModeller.h:103
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkVoxelModeller::SetScalarTypeToShort
void SetScalarTypeToShort()
Definition: vtkVoxelModeller.h:102
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkVoxelModeller::SetScalarTypeToBit
void SetScalarTypeToBit()
Definition: vtkVoxelModeller.h:109
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkVoxelModeller::BackgroundValue
double BackgroundValue
Definition: vtkVoxelModeller.h:148
vtkX3D::port
Definition: vtkX3D.h:447
vtkVoxelModeller::SetScalarTypeToUnsignedLong
void SetScalarTypeToUnsignedLong()
Definition: vtkVoxelModeller.h:100
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkVoxelModeller::SetScalarTypeToUnsignedChar
void SetScalarTypeToUnsignedChar()
Definition: vtkVoxelModeller.h:105
vtkVoxelModeller::~vtkVoxelModeller
~vtkVoxelModeller() override
Definition: vtkVoxelModeller.h:130
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:56
vtkVoxelModeller::ForegroundValue
double ForegroundValue
Definition: vtkVoxelModeller.h:147
vtkVoxelModeller::SetScalarTypeToChar
void SetScalarTypeToChar()
Definition: vtkVoxelModeller.h:107
vtkVoxelModeller::SetScalarTypeToDouble
void SetScalarTypeToDouble()
Definition: vtkVoxelModeller.h:95
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::info
Definition: vtkX3D.h:376
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
VTK_BIT
#define VTK_BIT
Definition: vtkType.h:48
vtkVoxelModeller::SetScalarTypeToFloat
void SetScalarTypeToFloat()
Definition: vtkVoxelModeller.h:94
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkVoxelModeller::SetScalarTypeToLong
void SetScalarTypeToLong()
Definition: vtkVoxelModeller.h:99
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkVoxelModeller::SetScalarTypeToInt
void SetScalarTypeToInt()
Definition: vtkVoxelModeller.h:96
vtkVoxelModeller
convert an arbitrary dataset to a voxel representation
Definition: vtkVoxelModeller.h:37
vtkVoxelModeller::MaximumDistance
double MaximumDistance
Definition: vtkVoxelModeller.h:145