GDCM 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

vtkImageMapToWindowLevelColors2.h
Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004
    00005   Copyright (c) 2006-2011 Mathieu Malaterre
    00006   All rights reserved.
    00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00008
    00009      This software is distributed WITHOUT ANY WARRANTY; without even
    00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00011      PURPOSE.  See the above copyright notice for more information.
    00012
    00013 =========================================================================*/
    00014 /*=========================================================================
    00015
    00016   Portions of this file are subject to the VTK Toolkit Version 3 copyright.
    00017
    00018   Program:   Visualization Toolkit
    00019   Module:    $RCSfile: vtkImageMapToWindowLevelColors2.h,v $
    00020
    00021   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
    00022   All rights reserved.
    00023   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00024
    00025      This software is distributed WITHOUT ANY WARRANTY; without even
    00026      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00027      PURPOSE.  See the above copyright notice for more information.
    00028
    00029 =========================================================================*/
    00030 // .NAME vtkImageMapToWindowLevelColors2 - map the input image through a lookup table and window / level it
    00031 // .SECTION Description
    00032 // The vtkImageMapToWindowLevelColors2 filter will take an input image of any
    00033 // valid scalar type, and map the first component of the image through a
    00034 // lookup table.  This resulting color will be modulated with value obtained
    00035 // by a window / level operation. The result is an image of type
    00036 // VTK_UNSIGNED_CHAR. If the lookup table is not set, or is set to NULL, then
    00037 // the input data will be passed through if it is already of type
    00038 // UNSIGNED_CHAR.
    00039 //
    00040 // .SECTION See Also
    00041 // vtkLookupTable vtkScalarsToColors
    00042
    00043 #ifndef VTKIMAGEMAPTOWINDOWLEVELCOLORS2_H
    00044 #define VTKIMAGEMAPTOWINDOWLEVELCOLORS2_H
    00045
    00046 #include "vtkImageMapToColors.h"
    00047
    00048 class VTK_EXPORT vtkImageMapToWindowLevelColors2 : public vtkImageMapToColors
    00049 {
    00050 public:
    00051   static vtkImageMapToWindowLevelColors2 *New();
    00052   vtkTypeRevisionMacro(vtkImageMapToWindowLevelColors2,vtkImageMapToColors);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054
    00055   // Description:
    00056   // Set / Get the Window to use -> modulation will be performed on the
    00057   // color based on (S - (L - W/2))/W where S is the scalar value, L is
    00058   // the level and W is the window.
    00059   vtkSetMacro( Window, double );
    00060   vtkGetMacro( Window, double );
    00061
    00062   // Description:
    00063   // Set / Get the Level to use -> modulation will be performed on the
    00064   // color based on (S - (L - W/2))/W where S is the scalar value, L is
    00065   // the level and W is the window.
    00066   vtkSetMacro( Level, double );
    00067   vtkGetMacro( Level, double );
    00068
    00069 protected:
    00070   vtkImageMapToWindowLevelColors2();
    00071   ~vtkImageMapToWindowLevelColors2();
    00072
    00073   virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
    00074   void ThreadedRequestData(vtkInformation *request,
    00075                            vtkInformationVector **inputVector,
    00076                            vtkInformationVector *outputVector,
    00077                            vtkImageData ***inData, vtkImageData **outData,
    00078                            int extent[6], int id);
    00079   virtual int RequestData(vtkInformation *request,
    00080                           vtkInformationVector **inputVector,
    00081                           vtkInformationVector *outputVector);
    00082
    00083   double Window;
    00084   double Level;
    00085
    00086 private:
    00087   vtkImageMapToWindowLevelColors2(const vtkImageMapToWindowLevelColors2&);  // Not implemented.
    00088   void operator=(const vtkImageMapToWindowLevelColors2&);  // Not implemented.
    00089 };
    00090
    00091 #endif