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
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
void SetScalarTypeToChar()
Control the scalar type of the output image.
void SetScalarTypeToFloat()
Control the scalar type of the output image.
void SetScalarTypeToInt()
Control the scalar type of the output image.
void SetScalarTypeToDouble()
Control the scalar type of the output image.
void SetScalarTypeToLong()
Control the scalar type of the output image.
void SetScalarTypeToUnsignedInt()
Control the scalar type of the output image.
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_FLOAT
Definition: vtkType.h:58
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetScalarTypeToBit()
Control the scalar type of the output image.
#define VTK_SHORT
Definition: vtkType.h:52
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_LONG
Definition: vtkType.h:56
convert an arbitrary dataset to a voxel representation
void SetScalarTypeToShort()
Control the scalar type of the output image.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
#define VTK_BIT
Definition: vtkType.h:48
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetScalarTypeToUnsignedShort()
Control the scalar type of the output image.
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
void SetScalarTypeToUnsignedLong()
Control the scalar type of the output image.
~vtkVoxelModeller() override
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void SetScalarTypeToUnsignedChar()
Control the scalar type of the output image.
#define VTK_INT
Definition: vtkType.h:54