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 #include "gdcmTypes.h" // GDCM_EXPORT
00029 
00030 class GDCM_EXPORT vtkLookupTable16 : public vtkLookupTable
00031 {
00032 public:
00033   static vtkLookupTable16 *New();
00034   
00035   vtkTypeRevisionMacro(vtkLookupTable16,vtkLookupTable);
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037 
00038   void Build();
00039 
00040   void SetNumberOfTableValues(vtkIdType number);
00041 
00042   unsigned char *WritePointer(const vtkIdType id, const int number);
00043 
00044   unsigned short *GetPointer(const vtkIdType id) {
00045     return this->Table16->GetPointer(4*id); };
00046 
00047 protected:
00048   vtkLookupTable16(int sze=256, int ext=256);
00049   ~vtkLookupTable16();
00050 
00051   vtkUnsignedShortArray *Table16;
00052 
00053 void MapScalarsThroughTable2(void *input, 
00054                                              unsigned char *output,
00055                                              int inputDataType, 
00056                                              int numberOfValues,
00057                                              int inputIncrement,
00058                                              int outputFormat);
00059  
00060 private:
00061   vtkLookupTable16(const vtkLookupTable16&);  // Not implemented.
00062   void operator=(const vtkLookupTable16&);  // Not implemented.
00063 };
00064 
00065 //----------------------------------------------------------------------------
00066 inline unsigned char *vtkLookupTable16::WritePointer(const vtkIdType id, 
00067                                                    const int number)
00068 {
00069   //this->InsertTime.Modified();
00070   return (unsigned char*)this->Table16->WritePointer(4*id,4*number);
00071 }
00072 
00073 #endif
00074 
00075 
00076 

Generated on Wed Jun 30 13:49:14 2010 for GDCM by doxygen 1.6.3
SourceForge.net Logo