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