VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageStencilToImage.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 vtkImageStencilToImage_h 00031 #define vtkImageStencilToImage_h 00032 00033 #include "vtkImagingStencilModule.h" // For export macro 00034 #include "vtkImageAlgorithm.h" 00035 00036 class VTKIMAGINGSTENCIL_EXPORT vtkImageStencilToImage : public vtkImageAlgorithm 00037 { 00038 public: 00039 static vtkImageStencilToImage *New(); 00040 vtkTypeMacro(vtkImageStencilToImage, vtkImageAlgorithm); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 vtkSetMacro(OutsideValue, double); 00046 vtkGetMacro(OutsideValue, double); 00048 00050 00051 vtkSetMacro(InsideValue, double); 00052 vtkGetMacro(InsideValue, double); 00054 00056 00057 vtkSetMacro(OutputScalarType,int); 00058 vtkGetMacro(OutputScalarType,int); 00059 void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);}; 00060 void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);}; 00061 void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);}; 00062 void SetOutputScalarTypeToUnsignedInt() 00063 {this->SetOutputScalarType(VTK_UNSIGNED_INT);}; 00064 void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);}; 00065 void SetOutputScalarTypeToUnsignedLong() 00066 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);}; 00067 void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);}; 00068 void SetOutputScalarTypeToUnsignedShort() 00069 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}; 00070 void SetOutputScalarTypeToUnsignedChar() 00071 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}; 00072 void SetOutputScalarTypeToChar() 00073 {this->SetOutputScalarType(VTK_CHAR);}; 00075 00076 protected: 00077 vtkImageStencilToImage(); 00078 ~vtkImageStencilToImage(); 00079 00080 virtual int RequestInformation(vtkInformation *, 00081 vtkInformationVector **, 00082 vtkInformationVector *); 00083 00084 virtual int RequestData(vtkInformation *, 00085 vtkInformationVector **, 00086 vtkInformationVector *); 00087 00088 double OutsideValue; 00089 double InsideValue; 00090 int OutputScalarType; 00091 00092 virtual int FillInputPortInformation(int, vtkInformation*); 00093 00094 private: 00095 vtkImageStencilToImage(const vtkImageStencilToImage&); // Not implemented. 00096 void operator=(const vtkImageStencilToImage&); // Not implemented. 00097 }; 00098 00099 #endif