VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageMapToColors.h,v $ 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 =========================================================================*/ 00031 #ifndef __vtkImageMapToColors_h 00032 #define __vtkImageMapToColors_h 00033 00034 00035 #include "vtkThreadedImageAlgorithm.h" 00036 00037 class vtkScalarsToColors; 00038 00039 class VTK_IMAGING_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm 00040 { 00041 public: 00042 static vtkImageMapToColors *New(); 00043 vtkTypeRevisionMacro(vtkImageMapToColors,vtkThreadedImageAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 virtual void SetLookupTable(vtkScalarsToColors*); 00049 vtkGetObjectMacro(LookupTable,vtkScalarsToColors); 00051 00053 00054 vtkSetMacro(OutputFormat,int); 00055 vtkGetMacro(OutputFormat,int); 00056 void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; }; 00057 void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; }; 00058 void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; }; 00059 void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; }; 00061 00063 00064 vtkSetMacro(ActiveComponent,int); 00065 vtkGetMacro(ActiveComponent,int); 00067 00069 00072 vtkSetMacro(PassAlphaToOutput,int); 00073 vtkBooleanMacro(PassAlphaToOutput,int); 00074 vtkGetMacro(PassAlphaToOutput,int); 00076 00078 virtual unsigned long GetMTime(); 00079 00080 protected: 00081 vtkImageMapToColors(); 00082 ~vtkImageMapToColors(); 00083 00084 virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00085 00086 void ThreadedRequestData(vtkInformation *request, 00087 vtkInformationVector **inputVector, 00088 vtkInformationVector *outputVector, 00089 vtkImageData ***inData, vtkImageData **outData, 00090 int extent[6], int id); 00091 00092 virtual int RequestData(vtkInformation *request, 00093 vtkInformationVector **inputVector, 00094 vtkInformationVector *outputVector); 00095 00096 vtkScalarsToColors *LookupTable; 00097 int OutputFormat; 00098 00099 int ActiveComponent; 00100 int PassAlphaToOutput; 00101 00102 int DataWasPassed; 00103 private: 00104 vtkImageMapToColors(const vtkImageMapToColors&); // Not implemented. 00105 void operator=(const vtkImageMapToColors&); // Not implemented. 00106 }; 00107 00108 #endif 00109 00110 00111 00112 00113 00114 00115