# vtkLookupTable16.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkLookupTable16.h,v $
    00005
    00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
    00007   All rights reserved.
    00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015 // .NAME vtkLookupTable16 -
    00016 // .SECTION Description
    00017 //
    00018 // .SECTION Caveats
    00019 //
    00020 // .SECTION See Also
    00021 // vtkLookupTable
    00022
    00023 #ifndef VTKLOOKUPTABLE16_H
    00024 #define VTKLOOKUPTABLE16_H
    00025
    00026 #include "vtkLookupTable.h"
    00027 #include "vtkUnsignedShortArray.h"
    00028
    00029 class VTK_EXPORT vtkLookupTable16 : public vtkLookupTable
    00030 {
    00031 public:
    00032   static vtkLookupTable16 *New();
    00033
    00034   vtkTypeRevisionMacro(vtkLookupTable16,vtkLookupTable);
    00035   void PrintSelf(ostream& os, vtkIndent indent);
    00036
    00037   void Build();
    00038
    00039   void SetNumberOfTableValues(vtkIdType number);
    00040
    00041   unsigned char *WritePointer(const vtkIdType id, const int number);
    00042
    00043   unsigned short *GetPointer(const vtkIdType id) {
    00044     return this->Table16->GetPointer(4*id); };
    00045
    00046 protected:
    00047   vtkLookupTable16(int sze=256, int ext=256);
    00048   ~vtkLookupTable16();
    00049
    00050   vtkUnsignedShortArray *Table16;
    00051
    00052 void MapScalarsThroughTable2(void *input,
    00053                                              unsigned char *output,
    00054                                              int inputDataType,
    00055                                              int numberOfValues,
    00056                                              int inputIncrement,
    00057                                              int outputFormat);
    00058
    00059 private:
    00060   vtkLookupTable16(const vtkLookupTable16&);  // Not implemented.
    00061   void operator=(const vtkLookupTable16&);  // Not implemented.
    00062 };
    00063
    00064 //----------------------------------------------------------------------------
    00065 inline unsigned char *vtkLookupTable16::WritePointer(const vtkIdType id,
    00066                                                    const int number)
    00067 {
    00068   //this->InsertTime.Modified();
    00069   return (unsigned char*)this->Table16->WritePointer(4*id,4*number);
    00070 }
    00071
    00072 #endif
    00073
    00074
    00075