GDCM 2.0.17

vtkImageMapToColors16.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004   Module:  $URL$
00005 
00006   Copyright (c) 2006-2010 Mathieu Malaterre
00007   All rights reserved.
00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html 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 =========================================================================*/
00015 /*=========================================================================
00016 
00017   Portions of this file are subject to the VTK Toolkit Version 3 copyright.
00018 
00019   Program:   Visualization Toolkit
00020   Module:    $RCSfile: vtkImageMapToColors16.h,v $
00021 
00022   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00023   All rights reserved.
00024   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00025 
00026      This software is distributed WITHOUT ANY WARRANTY; without even
00027      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00028      PURPOSE.  See the above copyright notice for more information.
00029 
00030 =========================================================================*/
00031 // .NAME vtkImageMapToColors16 - map the input image through a lookup table
00032 // .SECTION Description
00033 // The vtkImageMapToColors16 filter will take an input image of any valid
00034 // scalar type, and map the first component of the image through a
00035 // lookup table.  The result is an image of type VTK_UNSIGNED_CHAR.
00036 // If the lookup table is not set, or is set to NULL, then the input
00037 // data will be passed through if it is already of type VTK_UNSIGNED_CHAR.
00038 
00039 // .SECTION See Also
00040 // vtkLookupTable vtkScalarsToColors
00041 
00042 #ifndef VTKIMAGEMAPTOCOLORS16_H
00043 #define VTKIMAGEMAPTOCOLORS16_H
00044 
00045 
00046 #include "vtkThreadedImageAlgorithm.h"
00047 
00048 class vtkScalarsToColors;
00049 
00050 class VTK_EXPORT vtkImageMapToColors16 : public vtkThreadedImageAlgorithm
00051 {
00052 public:
00053   static vtkImageMapToColors16 *New();
00054   vtkTypeRevisionMacro(vtkImageMapToColors16,vtkThreadedImageAlgorithm);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00057   // Description:
00058   // Set the lookup table.
00059   virtual void SetLookupTable(vtkScalarsToColors*);
00060   vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
00061 
00062   // Description:
00063   // Set the output format, the default is RGBA.
00064   vtkSetMacro(OutputFormat,int);
00065   vtkGetMacro(OutputFormat,int);
00066   void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; };
00067   void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; };
00068   void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; };
00069   void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; };
00070 
00071   // Description:
00072   // Set the component to map for multi-component images (default: 0)
00073   vtkSetMacro(ActiveComponent,int);
00074   vtkGetMacro(ActiveComponent,int);
00075 
00076   // Description:
00077   // Use the alpha component of the input when computing the alpha component
00078   // of the output (useful when converting monochrome+alpha data to RGBA)
00079   vtkSetMacro(PassAlphaToOutput,int);
00080   vtkBooleanMacro(PassAlphaToOutput,int);
00081   vtkGetMacro(PassAlphaToOutput,int);
00082 
00083   // Description:
00084   // We need to check the modified time of the lookup table too.
00085   virtual unsigned long GetMTime();
00086 
00087 protected:
00088   vtkImageMapToColors16();
00089   ~vtkImageMapToColors16();
00090 
00091   virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00092 
00093   void ThreadedRequestData(vtkInformation *request,
00094                            vtkInformationVector **inputVector,
00095                            vtkInformationVector *outputVector,
00096                            vtkImageData ***inData, vtkImageData **outData,
00097                            int extent[6], int id);
00098 
00099   virtual int RequestData(vtkInformation *request,
00100                           vtkInformationVector **inputVector,
00101                           vtkInformationVector *outputVector);
00102 
00103   vtkScalarsToColors *LookupTable;
00104   int OutputFormat;
00105 
00106   int ActiveComponent;
00107   int PassAlphaToOutput;
00108 
00109   int DataWasPassed;
00110 private:
00111   vtkImageMapToColors16(const vtkImageMapToColors16&);  // Not implemented.
00112   void operator=(const vtkImageMapToColors16&);  // Not implemented.
00113 };
00114 
00115 #endif

Generated on Wed Feb 2 2011 19:21:02 for GDCM by doxygen 1.7.3
SourceForge.net Logo