VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkVoxelModeller.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00033 #ifndef __vtkVoxelModeller_h 00034 #define __vtkVoxelModeller_h 00035 00036 #include "vtkImagingHybridModule.h" // For export macro 00037 #include "vtkImageAlgorithm.h" 00038 00039 class VTKIMAGINGHYBRID_EXPORT vtkVoxelModeller : public vtkImageAlgorithm 00040 { 00041 public: 00042 vtkTypeMacro(vtkVoxelModeller,vtkImageAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00050 static vtkVoxelModeller *New(); 00051 00053 double ComputeModelBounds(double origin[3], double ar[3]); 00054 00056 00058 void SetSampleDimensions(int i, int j, int k); 00059 void SetSampleDimensions(int dim[3]); 00060 vtkGetVectorMacro(SampleDimensions,int,3); 00062 00064 00066 vtkSetClampMacro(MaximumDistance,double,0.0,1.0); 00067 vtkGetMacro(MaximumDistance,double); 00069 00071 00073 void SetModelBounds(double bounds[6]); 00074 void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax); 00075 vtkGetVectorMacro(ModelBounds,double,6); 00077 00079 00082 vtkSetMacro(ScalarType,int); 00083 void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);}; 00084 void SetScalarTypeToDouble(){this->SetScalarType(VTK_DOUBLE);}; 00085 void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);}; 00086 void SetScalarTypeToUnsignedInt() 00087 {this->SetScalarType(VTK_UNSIGNED_INT);}; 00088 void SetScalarTypeToLong(){this->SetScalarType(VTK_LONG);}; 00089 void SetScalarTypeToUnsignedLong() 00090 {this->SetScalarType(VTK_UNSIGNED_LONG);}; 00091 void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);}; 00092 void SetScalarTypeToUnsignedShort() 00093 {this->SetScalarType(VTK_UNSIGNED_SHORT);}; 00094 void SetScalarTypeToUnsignedChar() 00095 {this->SetScalarType(VTK_UNSIGNED_CHAR);}; 00096 void SetScalarTypeToChar() 00097 {this->SetScalarType(VTK_CHAR);}; 00098 void SetScalarTypeToBit() 00099 {this->SetScalarType(VTK_BIT);}; 00100 vtkGetMacro(ScalarType,int); 00102 00104 00108 vtkSetMacro(ForegroundValue, double); 00109 vtkGetMacro(ForegroundValue, double); 00110 vtkSetMacro(BackgroundValue, double); 00111 vtkGetMacro(BackgroundValue, double); 00112 protected: 00113 vtkVoxelModeller(); 00114 ~vtkVoxelModeller() {}; 00116 00117 virtual int RequestInformation (vtkInformation *, 00118 vtkInformationVector **, 00119 vtkInformationVector *); 00120 00121 // see vtkAlgorithm for details 00122 virtual int RequestData(vtkInformation *request, 00123 vtkInformationVector** inputVector, 00124 vtkInformationVector* outputVector); 00125 00126 // see algorithm for more info 00127 virtual int FillInputPortInformation(int port, vtkInformation* info); 00128 00129 int SampleDimensions[3]; 00130 double MaximumDistance; 00131 double ModelBounds[6]; 00132 double ForegroundValue; 00133 double BackgroundValue; 00134 int ScalarType; 00135 00136 private: 00137 vtkVoxelModeller(const vtkVoxelModeller&); // Not implemented. 00138 void operator=(const vtkVoxelModeller&); // Not implemented. 00139 }; 00140 00141 #endif