# vtkImageMapToWindowLevelColors2.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageMapToWindowLevelColors2.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 vtkImageMapToWindowLevelColors2 - map the input image through a lookup table and window / level it
    00016 // .SECTION Description
    00017 // The vtkImageMapToWindowLevelColors2 filter will take an input image of any
    00018 // valid scalar type, and map the first component of the image through a
    00019 // lookup table.  This resulting color will be modulated with value obtained
    00020 // by a window / level operation. The result is an image of type
    00021 // VTK_UNSIGNED_CHAR. If the lookup table is not set, or is set to NULL, then
    00022 // the input data will be passed through if it is already of type
    00023 // UNSIGNED_CHAR.
    00024 //
    00025 // .SECTION See Also
    00026 // vtkLookupTable vtkScalarsToColors
    00027
    00028 #ifndef __vtkImageMapToWindowLevelColors2_h
    00029 #define __vtkImageMapToWindowLevelColors2_h
    00030
    00031 #include "vtkImageMapToColors.h"
    00032 #include "gdcmTypes.h" // GDCM_EXPORT
    00033
    00034 class GDCM_EXPORT vtkImageMapToWindowLevelColors2 : public vtkImageMapToColors
    00035 {
    00036 public:
    00037   static vtkImageMapToWindowLevelColors2 *New();
    00038   vtkTypeRevisionMacro(vtkImageMapToWindowLevelColors2,vtkImageMapToColors);
    00039   void PrintSelf(ostream& os, vtkIndent indent);
    00040
    00041   // Description:
    00042   // Set / Get the Window to use -> modulation will be performed on the
    00043   // color based on (S - (L - W/2))/W where S is the scalar value, L is
    00044   // the level and W is the window.
    00045   vtkSetMacro( Window, double );
    00046   vtkGetMacro( Window, double );
    00047
    00048   // Description:
    00049   // Set / Get the Level to use -> modulation will be performed on the
    00050   // color based on (S - (L - W/2))/W where S is the scalar value, L is
    00051   // the level and W is the window.
    00052   vtkSetMacro( Level, double );
    00053   vtkGetMacro( Level, double );
    00054
    00055 protected:
    00056   vtkImageMapToWindowLevelColors2();
    00057   ~vtkImageMapToWindowLevelColors2();
    00058
    00059   virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
    00060   void ThreadedRequestData(vtkInformation *request,
    00061                            vtkInformationVector **inputVector,
    00062                            vtkInformationVector *outputVector,
    00063                            vtkImageData ***inData, vtkImageData **outData,
    00064                            int extent[6], int id);
    00065   virtual int RequestData(vtkInformation *request,
    00066                           vtkInformationVector **inputVector,
    00067                           vtkInformationVector *outputVector);
    00068
    00069   double Window;
    00070   double Level;
    00071
    00072 private:
    00073   vtkImageMapToWindowLevelColors2(const vtkImageMapToWindowLevelColors2&);  // Not implemented.
    00074   void operator=(const vtkImageMapToWindowLevelColors2&);  // Not implemented.
    00075 };
    00076
    00077 #endif
    00078
    00079
    00080
    00081
    00082
    00083
    00084