# vtkImageMapToWindowLevelColors2.h

Go to the documentation of this file.

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