VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageResliceToColors.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 vtkImageResliceToColors_h 00034 #define vtkImageResliceToColors_h 00035 00036 00037 #include "vtkImagingCoreModule.h" // For export macro 00038 #include "vtkImageReslice.h" 00039 00040 class vtkScalarsToColors; 00041 00042 class VTKIMAGINGCORE_EXPORT vtkImageResliceToColors : public vtkImageReslice 00043 { 00044 public: 00045 static vtkImageResliceToColors *New(); 00046 vtkTypeMacro(vtkImageResliceToColors, vtkImageReslice); 00047 00048 virtual void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 00056 virtual void SetLookupTable(vtkScalarsToColors *table); 00057 vtkGetObjectMacro(LookupTable,vtkScalarsToColors); 00059 00061 00062 vtkSetClampMacro(OutputFormat,int,VTK_LUMINANCE,VTK_RGBA); 00063 vtkGetMacro(OutputFormat,int); 00064 void SetOutputFormatToRGBA() { 00065 this->OutputFormat = VTK_RGBA; }; 00066 void SetOutputFormatToRGB() { 00067 this->OutputFormat = VTK_RGB; }; 00068 void SetOutputFormatToLuminanceAlpha() { 00069 this->OutputFormat = VTK_LUMINANCE_ALPHA; }; 00070 void SetOutputFormatToLuminance() { 00071 this->OutputFormat = VTK_LUMINANCE; }; 00073 00075 00078 void SetBypass(int bypass); 00079 void BypassOn() { this->SetBypass(1); } 00080 void BypassOff() { this->SetBypass(0); } 00081 int GetBypass() { return this->Bypass; } 00083 00086 unsigned long int GetMTime(); 00087 00088 protected: 00089 vtkImageResliceToColors(); 00090 ~vtkImageResliceToColors(); 00091 00092 vtkScalarsToColors *LookupTable; 00093 vtkScalarsToColors *DefaultLookupTable; 00094 int OutputFormat; 00095 int Bypass; 00096 00097 int ConvertScalarInfo(int &scalarType, int &numComponents); 00098 00099 void ConvertScalars(void *inPtr, void *outPtr, int inputType, 00100 int inputNumComponents, int count, 00101 int idX, int idY, int idZ, int threadId); 00102 00103 private: 00104 vtkImageResliceToColors(const vtkImageResliceToColors&); // Not implemented. 00105 void operator=(const vtkImageResliceToColors&); // Not implemented. 00106 }; 00107 00108 #endif