GDCM 3.2.1

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=========================================================================*/
30// .NAME vtkLookupTable16 -
31// .SECTION Description
32//
33// .SECTION Caveats
34//
35// .SECTION See Also
36// vtkLookupTable
37
38#ifndef VTKLOOKUPTABLE16_H
39#define VTKLOOKUPTABLE16_H
40
41#include "vtkgdcmModule.h"
42#include "vtkLookupTable.h"
43#include "vtkUnsignedShortArray.h"
44
45 class VTKGDCM_EXPORT vtkLookupTable16 : public vtkLookupTable
46{
47 public:
48 static vtkLookupTable16 *New();
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
62 protected:
63 vtkLookupTable16(int sze=256, int ext=256);
64 ~vtkLookupTable16();
65
66 vtkUnsignedShortArray *Table16;
67
68 void MapScalarsThroughTable2(void *input,
69 unsigned char *output,
70 int inputDataType,
71 int numberOfValues,
72 int inputIncrement,
73 int outputFormat);
74
75 private:
76 vtkLookupTable16(const vtkLookupTable16&); // Not implemented.
77 void operator=(const vtkLookupTable16&); // Not implemented.
78};
79
80//----------------------------------------------------------------------------
81 inline 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::vtkLookupTable16
vtkLookupTable16(int sze=256, int ext=256)
vtkLookupTable16::WritePointer
unsigned char * WritePointer(const vtkIdType id, const int number)
Definition vtkLookupTable16.h:81
vtkLookupTable16::MapScalarsThroughTable2
void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
vtkLookupTable16::New
static vtkLookupTable16 * New()
vtkLookupTable16::~vtkLookupTable16
~vtkLookupTable16()
vtkLookupTable16::GetPointer
unsigned short * GetPointer(const vtkIdType id)
Definition vtkLookupTable16.h:59
vtkLookupTable16::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkLookupTable16::Build
void Build()
vtkLookupTable16::Table16
vtkUnsignedShortArray * Table16
Definition vtkLookupTable16.h:66
vtkLookupTable16::SetNumberOfTableValues
void SetNumberOfTableValues(vtkIdType number)
vtkLookupTable16::vtkTypeMacro
vtkTypeMacro(vtkLookupTable16, vtkLookupTable)