VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageSlab.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 =========================================================================*/ 00030 #ifndef __vtkImageSlab_h 00031 #define __vtkImageSlab_h 00032 00033 #include "vtkImagingGeneralModule.h" // For export macro 00034 #include "vtkThreadedImageAlgorithm.h" 00035 00036 class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm 00037 { 00038 public: 00039 static vtkImageSlab *New(); 00040 vtkTypeMacro(vtkImageSlab, vtkThreadedImageAlgorithm); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00046 vtkSetClampMacro(Orientation, int, 0, 2); 00047 void SetOrientationToX() { 00048 this->SetOrientation(0); }; 00049 void SetOrientationToY() { 00050 this->SetOrientation(1); }; 00051 void SetOrientationToZ() { 00052 this->SetOrientation(2); }; 00053 vtkGetMacro(Orientation, int); 00055 00057 00059 vtkSetVector2Macro(SliceRange, int); 00060 vtkGetVector2Macro(SliceRange, int); 00062 00064 00066 vtkSetClampMacro(Operation, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM); 00067 void SetOperationToMin() { 00068 this->SetOperation(VTK_IMAGE_SLAB_MIN); }; 00069 void SetOperationToMax() { 00070 this->SetOperation(VTK_IMAGE_SLAB_MAX); }; 00071 void SetOperationToMean() { 00072 this->SetOperation(VTK_IMAGE_SLAB_MEAN); }; 00073 void SetOperationToSum() { 00074 this->SetOperation(VTK_IMAGE_SLAB_SUM); }; 00075 vtkGetMacro(Operation, int); 00076 const char *GetOperationAsString(); 00078 00080 00084 vtkSetMacro(TrapezoidIntegration, int); 00085 vtkBooleanMacro(TrapezoidIntegration, int); 00086 vtkGetMacro(TrapezoidIntegration, int); 00088 00090 00095 vtkSetMacro(MultiSliceOutput, int); 00096 vtkBooleanMacro(MultiSliceOutput, int); 00097 vtkGetMacro(MultiSliceOutput, int); 00099 00101 00105 void SetOutputScalarTypeToFloat() { 00106 this->SetOutputScalarType(VTK_FLOAT); }; 00107 void SetOutputScalarTypeToDouble() { 00108 this->SetOutputScalarType(VTK_DOUBLE); }; 00109 void SetOutputScalarTypeToInputScalarType() { 00110 this->SetOutputScalarType(0); }; 00111 vtkGetMacro(OutputScalarType, int); 00113 00114 protected: 00115 vtkImageSlab(); 00116 ~vtkImageSlab(); 00117 00118 virtual int RequestInformation(vtkInformation *, vtkInformationVector **, 00119 vtkInformationVector *); 00120 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, 00121 vtkInformationVector *); 00122 virtual void ThreadedRequestData(vtkInformation *request, 00123 vtkInformationVector **inputVector, 00124 vtkInformationVector *outputVector, 00125 vtkImageData ***inData, 00126 vtkImageData **outData, int ext[6], int id); 00127 00128 vtkSetMacro(OutputScalarType, int); 00129 00130 int Operation; 00131 int Orientation; 00132 int SliceRange[2]; 00133 int OutputScalarType; 00134 int MultiSliceOutput; 00135 int TrapezoidIntegration; 00136 00137 private: 00138 vtkImageSlab(const vtkImageSlab&); // Not implemented. 00139 void operator=(const vtkImageSlab&); // Not implemented. 00140 }; 00141 00142 #endif