vtk-dicom  0.8.14
vtkDICOMLookupTable.h
1 /*=========================================================================
2 
3  Program: DICOM for VTK
4 
5  Copyright (c) 2012-2022 David Gobbi
6  All rights reserved.
7  See Copyright.txt or http://dgobbi.github.io/bsd3.txt 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 =========================================================================*/
23 #ifndef vtkDICOMLookupTable_h
24 #define vtkDICOMLookupTable_h
25 
26 #include "vtkLookupTable.h"
27 #include "vtkDICOMModule.h" // For export macro
28 #include "vtkDICOMConfig.h" // For configuration details
29 
30 class vtkDICOMMetaData;
31 
32 //----------------------------------------------------------------------------
33 class VTKDICOM_EXPORT vtkDICOMLookupTable : public vtkLookupTable
34 {
35 public:
38  vtkTypeMacro(vtkDICOMLookupTable, vtkLookupTable);
39 
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_DICOM_OVERRIDE;
42 
44 
49  void BuildStandardPalette(const char *name);
50 
52 
57  void BuildImagePalette(vtkDICOMMetaData *meta, int idx=0);
58 
59 protected:
61  ~vtkDICOMLookupTable() VTK_DICOM_OVERRIDE;
62 
64 
67  static bool BuildSegmentedLUT(
68  const unsigned short *input, unsigned int n, double divisor,
69  unsigned char *lut, unsigned int stride, unsigned int count);
70 
71 private:
72 #ifdef VTK_DICOM_DELETE
73  vtkDICOMLookupTable(const vtkDICOMLookupTable&) VTK_DICOM_DELETE;
74  void operator=(const vtkDICOMLookupTable&) VTK_DICOM_DELETE;
75 #else
77  void operator=(const vtkDICOMLookupTable&) = delete;
78 #endif
79 };
80 
81 #endif // vtkDICOMLookupTable_h
Lookup tables from DICOM data.
Definition: vtkDICOMLookupTable.h:34
static vtkDICOMLookupTable * New()
Static method for construction.
void BuildStandardPalette(const char *name)
Build the a standard lookup table, given a code string.
void BuildImagePalette(vtkDICOMMetaData *meta, int idx=0)
Build the lookup table from the supplied meta data.
void PrintSelf(ostream &os, vtkIndent indent) VTK_DICOM_OVERRIDE
Print information about this object.
A container class for DICOM metadata.
Definition: vtkDICOMMetaData.h:44
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:69