VTK
dox/Imaging/vtkVoxelModeller.h
Go to the documentation of this file.
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 "vtkImageAlgorithm.h"
00037 
00038 class VTK_IMAGING_EXPORT vtkVoxelModeller : public vtkImageAlgorithm 
00039 {
00040 public:
00041   vtkTypeMacro(vtkVoxelModeller,vtkImageAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00049   static vtkVoxelModeller *New();
00050 
00052   double ComputeModelBounds(double origin[3], double ar[3]);
00053 
00055 
00057   void SetSampleDimensions(int i, int j, int k);
00058   void SetSampleDimensions(int dim[3]);
00059   vtkGetVectorMacro(SampleDimensions,int,3);
00061 
00063 
00065   vtkSetClampMacro(MaximumDistance,double,0.0,1.0);
00066   vtkGetMacro(MaximumDistance,double);
00068 
00070 
00072   void SetModelBounds(double bounds[6]);
00073   void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
00074   vtkGetVectorMacro(ModelBounds,double,6);
00076 
00078 
00081   vtkSetMacro(ScalarType,int);
00082   void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);};
00083   void SetScalarTypeToDouble(){this->SetScalarType(VTK_DOUBLE);};
00084   void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);};
00085   void SetScalarTypeToUnsignedInt()
00086     {this->SetScalarType(VTK_UNSIGNED_INT);};
00087   void SetScalarTypeToLong(){this->SetScalarType(VTK_LONG);};
00088   void SetScalarTypeToUnsignedLong()
00089     {this->SetScalarType(VTK_UNSIGNED_LONG);};
00090   void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);};
00091   void SetScalarTypeToUnsignedShort()
00092     {this->SetScalarType(VTK_UNSIGNED_SHORT);};
00093   void SetScalarTypeToUnsignedChar()
00094     {this->SetScalarType(VTK_UNSIGNED_CHAR);};
00095   void SetScalarTypeToChar()
00096     {this->SetScalarType(VTK_CHAR);};
00097   void SetScalarTypeToBit()
00098     {this->SetScalarType(VTK_BIT);};
00099   vtkGetMacro(ScalarType,int);
00101 
00103 
00107   vtkSetMacro(ForegroundValue, double);
00108   vtkGetMacro(ForegroundValue, double);
00109   vtkSetMacro(BackgroundValue, double);
00110   vtkGetMacro(BackgroundValue, double);
00111 protected:
00112   vtkVoxelModeller();
00113   ~vtkVoxelModeller() {};
00115 
00116   virtual int RequestInformation (vtkInformation *, 
00117                                   vtkInformationVector **, 
00118                                   vtkInformationVector *);
00119 
00120   // see vtkAlgorithm for details
00121   virtual int RequestData(vtkInformation *request,
00122                           vtkInformationVector** inputVector,
00123                           vtkInformationVector* outputVector);
00124 
00125   // see algorithm for more info
00126   virtual int FillInputPortInformation(int port, vtkInformation* info);
00127 
00128   int SampleDimensions[3];
00129   double MaximumDistance;
00130   double ModelBounds[6];
00131   double ForegroundValue;
00132   double BackgroundValue;
00133   int ScalarType;
00134 
00135 private:
00136   vtkVoxelModeller(const vtkVoxelModeller&);  // Not implemented.
00137   void operator=(const vtkVoxelModeller&);  // Not implemented.
00138 };
00139 
00140 #endif