VTK
dox/Imaging/Core/vtkImageMapToColors.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageMapToColors.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 =========================================================================*/
00034 #ifndef __vtkImageMapToColors_h
00035 #define __vtkImageMapToColors_h
00036 
00037 
00038 #include "vtkImagingCoreModule.h" // For export macro
00039 #include "vtkThreadedImageAlgorithm.h"
00040 
00041 class vtkScalarsToColors;
00042 
00043 class VTKIMAGINGCORE_EXPORT vtkImageMapToColors : public vtkThreadedImageAlgorithm
00044 {
00045 public:
00046   static vtkImageMapToColors *New();
00047   vtkTypeMacro(vtkImageMapToColors,vtkThreadedImageAlgorithm);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00052   virtual void SetLookupTable(vtkScalarsToColors*);
00053   vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
00055 
00057 
00058   vtkSetMacro(OutputFormat,int);
00059   vtkGetMacro(OutputFormat,int);
00060   void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; };
00061   void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; };
00062   void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; };
00063   void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; };
00065 
00067 
00068   vtkSetMacro(ActiveComponent,int);
00069   vtkGetMacro(ActiveComponent,int);
00071 
00073 
00076   vtkSetMacro(PassAlphaToOutput,int);
00077   vtkBooleanMacro(PassAlphaToOutput,int);
00078   vtkGetMacro(PassAlphaToOutput,int);
00080 
00082   virtual unsigned long GetMTime();
00083 
00084 protected:
00085   vtkImageMapToColors();
00086   ~vtkImageMapToColors();
00087 
00088   virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00089 
00090   void ThreadedRequestData(vtkInformation *request,
00091                            vtkInformationVector **inputVector,
00092                            vtkInformationVector *outputVector,
00093                            vtkImageData ***inData, vtkImageData **outData,
00094                            int extent[6], int id);
00095 
00096   virtual int RequestData(vtkInformation *request,
00097                           vtkInformationVector **inputVector,
00098                           vtkInformationVector *outputVector);
00099 
00100   vtkScalarsToColors *LookupTable;
00101   int OutputFormat;
00102 
00103   int ActiveComponent;
00104   int PassAlphaToOutput;
00105 
00106   int DataWasPassed;
00107 private:
00108   vtkImageMapToColors(const vtkImageMapToColors&);  // Not implemented.
00109   void operator=(const vtkImageMapToColors&);  // Not implemented.
00110 };
00111 
00112 #endif
00113 
00114 
00115 
00116 
00117 
00118 
00119