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 =========================================================================*/
34 #ifndef vtkVoxelModeller_h
35 #define vtkVoxelModeller_h
36 
37 #include "vtkImagingHybridModule.h" // For export macro
38 #include "vtkImageAlgorithm.h"
39 
40 class VTKIMAGINGHYBRID_EXPORT vtkVoxelModeller : public vtkImageAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
53  static vtkVoxelModeller *New();
54 
58  double ComputeModelBounds(double origin[3], double ar[3]);
59 
61 
65  void SetSampleDimensions(int i, int j, int k);
66  void SetSampleDimensions(int dim[3]);
67  vtkGetVectorMacro(SampleDimensions,int,3);
69 
71 
75  vtkSetClampMacro(MaximumDistance,double,0.0,1.0);
76  vtkGetMacro(MaximumDistance,double);
78 
80 
84  void SetModelBounds(const double bounds[6]);
85  void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
86  vtkGetVectorMacro(ModelBounds,double,6);
88 
90 
96  vtkSetMacro(ScalarType,int);
97  void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);};
98  void SetScalarTypeToDouble(){this->SetScalarType(VTK_DOUBLE);};
99  void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);};
101  {this->SetScalarType(VTK_UNSIGNED_INT);};
102  void SetScalarTypeToLong(){this->SetScalarType(VTK_LONG);};
104  {this->SetScalarType(VTK_UNSIGNED_LONG);};
105  void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);};
107  {this->SetScalarType(VTK_UNSIGNED_SHORT);};
109  {this->SetScalarType(VTK_UNSIGNED_CHAR);};
111  {this->SetScalarType(VTK_CHAR);};
113  {this->SetScalarType(VTK_BIT);};
114  vtkGetMacro(ScalarType,int);
116 
118 
125  vtkSetMacro(ForegroundValue, double);
126  vtkGetMacro(ForegroundValue, double);
127  vtkSetMacro(BackgroundValue, double);
128  vtkGetMacro(BackgroundValue, double);
130 
131 protected:
134 
138 
139  // see vtkAlgorithm for details
140  virtual int RequestData(vtkInformation *request,
141  vtkInformationVector** inputVector,
142  vtkInformationVector* outputVector);
143 
144  // see algorithm for more info
146 
147  int SampleDimensions[3];
149  double ModelBounds[6];
153 
154 private:
155  vtkVoxelModeller(const vtkVoxelModeller&) VTK_DELETE_FUNCTION;
156  void operator=(const vtkVoxelModeller&) VTK_DELETE_FUNCTION;
157 };
158 
159 #endif
vtkVoxelModeller::SetModelBounds
void SetModelBounds(const double bounds[6])
Specify the position in space to perform the voxelization.
vtkVoxelModeller::SetScalarTypeToUnsignedInt
void SetScalarTypeToUnsignedInt()
Definition: vtkVoxelModeller.h:100
vtkVoxelModeller::ScalarType
int ScalarType
Definition: vtkVoxelModeller.h:152
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkVoxelModeller::SetScalarTypeToUnsignedShort
void SetScalarTypeToUnsignedShort()
Definition: vtkVoxelModeller.h:106
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkVoxelModeller::SetScalarTypeToShort
void SetScalarTypeToShort()
Definition: vtkVoxelModeller.h:105
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkVoxelModeller::vtkVoxelModeller
vtkVoxelModeller()
vtkVoxelModeller::SetScalarTypeToBit
void SetScalarTypeToBit()
Definition: vtkVoxelModeller.h:112
vtkImageAlgorithm.h
vtkVoxelModeller::ComputeModelBounds
double ComputeModelBounds(double origin[3], double ar[3])
Compute the ModelBounds based on the input geometry.
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:41
vtkVoxelModeller::BackgroundValue
double BackgroundValue
Definition: vtkVoxelModeller.h:151
vtkVoxelModeller::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkVoxelModeller::SetModelBounds
void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
vtkVoxelModeller::SetScalarTypeToUnsignedLong
void SetScalarTypeToUnsignedLong()
Definition: vtkVoxelModeller.h:103
vtkVoxelModeller::SetScalarTypeToUnsignedChar
void SetScalarTypeToUnsignedChar()
Definition: vtkVoxelModeller.h:108
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
vtkVoxelModeller::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkVoxelModeller::ForegroundValue
double ForegroundValue
Definition: vtkVoxelModeller.h:150
vtkVoxelModeller::SetScalarTypeToChar
void SetScalarTypeToChar()
Definition: vtkVoxelModeller.h:110
vtkVoxelModeller::SetScalarTypeToDouble
void SetScalarTypeToDouble()
Definition: vtkVoxelModeller.h:98
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkVoxelModeller::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkVoxelModeller::New
static vtkVoxelModeller * New()
Construct an instance of vtkVoxelModeller with its sample dimensions set to (50,50,...
VTK_BIT
#define VTK_BIT
Definition: vtkType.h:48
vtkVoxelModeller::SetScalarTypeToFloat
void SetScalarTypeToFloat()
Definition: vtkVoxelModeller.h:97
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkVoxelModeller::SetScalarTypeToLong
void SetScalarTypeToLong()
Definition: vtkVoxelModeller.h:102
vtkVoxelModeller::SetSampleDimensions
void SetSampleDimensions(int dim[3])
vtkVoxelModeller::SetScalarTypeToInt
void SetScalarTypeToInt()
Definition: vtkVoxelModeller.h:99
vtkVoxelModeller::~vtkVoxelModeller
~vtkVoxelModeller()
Definition: vtkVoxelModeller.h:133
vtkVoxelModeller
convert an arbitrary dataset to a voxel representation
Definition: vtkVoxelModeller.h:41
vtkVoxelModeller::MaximumDistance
double MaximumDistance
Definition: vtkVoxelModeller.h:148
vtkVoxelModeller::SetSampleDimensions
void SetSampleDimensions(int i, int j, int k)
Set the i-j-k dimensions on which to sample the distance function.