vtkgdcm
vtkLookupTable16.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: vtkLookupTable16.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 =========================================================================*/
39 #ifndef VTKLOOKUPTABLE16_H
40 #define VTKLOOKUPTABLE16_H
41 
42 #include "vtkgdcmModule.h"
43 #include "vtkLookupTable.h"
44 #include "vtkUnsignedShortArray.h"
45 
46 class VTKGDCM_EXPORT vtkLookupTable16 : public vtkLookupTable
47 {
48 public:
49  static vtkLookupTable16 *New();
50 
51  vtkTypeMacro(vtkLookupTable16,vtkLookupTable);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
54  void Build();
55 
56  void SetNumberOfTableValues(vtkIdType number);
57 
58  unsigned char *WritePointer(const vtkIdType id, const int number);
59 
60  unsigned short *GetPointer(const vtkIdType id) {
61  return this->Table16->GetPointer(4*id); };
62 
63 protected:
64  vtkLookupTable16(int sze=256, int ext=256);
66 
67  vtkUnsignedShortArray *Table16;
68 
69 void MapScalarsThroughTable2(void *input,
70  unsigned char *output,
71  int inputDataType,
72  int numberOfValues,
73  int inputIncrement,
74  int outputFormat);
75 
76 private:
77  vtkLookupTable16(const vtkLookupTable16&); // Not implemented.
78  void operator=(const vtkLookupTable16&); // Not implemented.
79 };
80 
81 //----------------------------------------------------------------------------
82 inline unsigned char *vtkLookupTable16::WritePointer(const vtkIdType id,
83  const int number)
84 {
85  //this->InsertTime.Modified();
86  return (unsigned char*)this->Table16->WritePointer(4*id,4*number);
87 }
88 
89 #endif
vtkLookupTable16(int sze=256, int ext=256)
unsigned char * WritePointer(const vtkIdType id, const int number)
void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
void PrintSelf(ostream &os, vtkIndent indent)
vtkUnsignedShortArray * Table16
void SetNumberOfTableValues(vtkIdType number)
static vtkLookupTable16 * New()
unsigned short * GetPointer(const vtkIdType id)