vtkgdcm
vtkImageMapToColors16.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 /*=========================================================================
15 
16  Portions of this file are subject to the VTK Toolkit Version 3 copyright.
17 
18  Program: Visualization Toolkit
19  Module: $RCSfile: vtkImageMapToColors16.h,v $
20 
21  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
22  All rights reserved.
23  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
24 
25  This software is distributed WITHOUT ANY WARRANTY; without even
26  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
27  PURPOSE. See the above copyright notice for more information.
28 
29 =========================================================================*/
44 #ifndef VTKIMAGEMAPTOCOLORS16_H
45 #define VTKIMAGEMAPTOCOLORS16_H
46 
47 
48 #include "vtkgdcmModule.h"
49 #include "vtkThreadedImageAlgorithm.h"
50 
51 class vtkScalarsToColors;
52 
53 class VTKGDCM_EXPORT vtkImageMapToColors16 : public vtkThreadedImageAlgorithm
54 {
55 public:
57  vtkTypeMacro(vtkImageMapToColors16,vtkThreadedImageAlgorithm);
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64  virtual void SetLookupTable(vtkScalarsToColors*);
65  vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
67 
69 
72  vtkSetMacro(OutputFormat,int);
73  vtkGetMacro(OutputFormat,int);
74  void SetOutputFormatToRGBA() { this->OutputFormat = VTK_RGBA; };
75  void SetOutputFormatToRGB() { this->OutputFormat = VTK_RGB; };
76  void SetOutputFormatToLuminanceAlpha() { this->OutputFormat = VTK_LUMINANCE_ALPHA; };
77  void SetOutputFormatToLuminance() { this->OutputFormat = VTK_LUMINANCE; };
79 
81 
84  vtkSetMacro(ActiveComponent,int);
85  vtkGetMacro(ActiveComponent,int);
87 
89 
93  vtkSetMacro(PassAlphaToOutput,int);
94  vtkBooleanMacro(PassAlphaToOutput,int);
95  vtkGetMacro(PassAlphaToOutput,int);
97 
99 
102 #ifdef VTK_HAS_MTIME_TYPE
103  virtual vtkMTimeType GetMTime();
104 #else
105  virtual unsigned long GetMTime();
106 #endif
108 
109 protected:
112 
113  virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
114 
115  void ThreadedRequestData(vtkInformation *request,
116  vtkInformationVector **inputVector,
117  vtkInformationVector *outputVector,
118  vtkImageData ***inData, vtkImageData **outData,
119  int extent[6], int id);
120 
121  virtual int RequestData(vtkInformation *request,
122  vtkInformationVector **inputVector,
123  vtkInformationVector *outputVector);
124 
125  vtkScalarsToColors *LookupTable;
127 
130 
132 private:
133  vtkImageMapToColors16(const vtkImageMapToColors16&); // Not implemented.
134  void operator=(const vtkImageMapToColors16&); // Not implemented.
135 };
136 
137 #endif
map the input image through a lookup table
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int id)
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkScalarsToColors * LookupTable
virtual unsigned long GetMTime()
We need to check the modified time of the lookup table too.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void PrintSelf(ostream &os, vtkIndent indent)
static vtkImageMapToColors16 * New()