Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit

Applies the gray-value or color/opacity level window to scalar or RGB(A) images. More...

#include <vtkMitkLevelWindowFilter.h>

Inheritance diagram for vtkMitkLevelWindowFilter:
Collaboration diagram for vtkMitkLevelWindowFilter:

Public Member Functions

 vtkTypeMacro (vtkMitkLevelWindowFilter, vtkThreadedImageAlgorithm)
 
vtkMTimeType GetMTime () override
 Get the modification time, considering the lookup table's modification time. More...
 
vtkScalarsToColors * GetLookupTable ()
 Get the lookup table for the RGB level window. More...
 
void SetLookupTable (vtkScalarsToColors *lookupTable)
 Set the lookup table for the RGB level window. More...
 
vtkPiecewiseFunction * GetOpacityPiecewiseFunction ()
 Get the piecewise function used to map scalar values to the alpha component. More...
 
void SetOpacityPiecewiseFunction (vtkPiecewiseFunction *opacityFunction)
 Set the piecewise function used to map scalar values to the alpha component. More...
 
void SetMinOpacity (double minOpacity)
 Set the lower window opacity for the alpha level window. More...
 
double GetMinOpacity () const
 Get the lower window opacity for the alpha level window. More...
 
void SetMaxOpacity (double maxOpacity)
 Set the upper window opacity for the alpha level window. More...
 
double GetMaxOpacity () const
 Get the upper window opacity for the alpha level window. More...
 
void SetClippingBounds (double *)
 Set clipping bounds for the opaque part of the resliced 2D image. More...
 

Static Public Member Functions

static vtkMitkLevelWindowFilter * New ()
 Create a new instance of vtkMitkLevelWindowFilter. More...
 

Protected Member Functions

 vtkMitkLevelWindowFilter ()
 Default constructor. More...
 
 ~vtkMitkLevelWindowFilter () override
 Destructor. More...
 
void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, int extent[6], int id) override
 Threaded execution method that applies the level window to image data. More...
 
int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 Standard VTK pipeline method to propagate output information. More...
 

Detailed Description

Applies the gray-value or color/opacity level window to scalar or RGB(A) images.

This filter is used to apply the color level window to RGB images. The RGB channels are converted to the HSI color space, where the level window can be applied. Afterwards, the HSI values are transformed back to the RGB space.

The filter is also able to apply an opacity level window to RGBA images.

Definition at line 33 of file vtkMitkLevelWindowFilter.h.

Constructor & Destructor Documentation

◆ vtkMitkLevelWindowFilter()

vtkMitkLevelWindowFilter::vtkMitkLevelWindowFilter ( )
protected

Default constructor.

◆ ~vtkMitkLevelWindowFilter()

vtkMitkLevelWindowFilter::~vtkMitkLevelWindowFilter ( )
overrideprotected

Destructor.

Member Function Documentation

◆ GetLookupTable()

vtkScalarsToColors* vtkMitkLevelWindowFilter::GetLookupTable ( )

Get the lookup table for the RGB level window.

Returns
The current vtkScalarsToColors lookup table, or nullptr.

◆ GetMaxOpacity()

double vtkMitkLevelWindowFilter::GetMaxOpacity ( ) const
inline

Get the upper window opacity for the alpha level window.

Returns
The maximum opacity value.

◆ GetMinOpacity()

double vtkMitkLevelWindowFilter::GetMinOpacity ( ) const
inline

Get the lower window opacity for the alpha level window.

Returns
The minimum opacity value.

◆ GetMTime()

vtkMTimeType vtkMitkLevelWindowFilter::GetMTime ( )
override

Get the modification time, considering the lookup table's modification time.

Returns
The latest modification time of this filter or its lookup table.

◆ GetOpacityPiecewiseFunction()

vtkPiecewiseFunction* vtkMitkLevelWindowFilter::GetOpacityPiecewiseFunction ( )
inline

Get the piecewise function used to map scalar values to the alpha component.

This is only used when the lookup table is a vtkColorTransferFunction.

Returns
The opacity piecewise function, or nullptr.

Definition at line 69 of file vtkMitkLevelWindowFilter.h.

◆ New()

static vtkMitkLevelWindowFilter* vtkMitkLevelWindowFilter::New ( )
static

Create a new instance of vtkMitkLevelWindowFilter.

◆ RequestInformation()

int vtkMitkLevelWindowFilter::RequestInformation ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
overrideprotected

Standard VTK pipeline method to propagate output information.

Returns
1 on success.

◆ SetClippingBounds()

void vtkMitkLevelWindowFilter::SetClippingBounds ( double *  )

Set clipping bounds for the opaque part of the resliced 2D image.

The bounds are specified as a four-element array (xmin, xmax, ymin, ymax).

◆ SetLookupTable()

void vtkMitkLevelWindowFilter::SetLookupTable ( vtkScalarsToColors *  lookupTable)

Set the lookup table for the RGB level window.

Parameters
[in]lookupTableThe vtkScalarsToColors lookup table to use.

◆ SetMaxOpacity()

void vtkMitkLevelWindowFilter::SetMaxOpacity ( double  maxOpacity)

Set the upper window opacity for the alpha level window.

Parameters
[in]maxOpacityThe maximum opacity value.

◆ SetMinOpacity()

void vtkMitkLevelWindowFilter::SetMinOpacity ( double  minOpacity)

Set the lower window opacity for the alpha level window.

Parameters
[in]minOpacityThe minimum opacity value.

◆ SetOpacityPiecewiseFunction()

void vtkMitkLevelWindowFilter::SetOpacityPiecewiseFunction ( vtkPiecewiseFunction *  opacityFunction)

Set the piecewise function used to map scalar values to the alpha component.

This is only used when the lookup table is a vtkColorTransferFunction.

Parameters
[in]opacityFunctionThe piecewise function for opacity mapping.

◆ ThreadedExecute()

void vtkMitkLevelWindowFilter::ThreadedExecute ( vtkImageData *  inData,
vtkImageData *  outData,
int  extent[6],
int  id 
)
overrideprotected

Threaded execution method that applies the level window to image data.

Parameters
[in]inDataThe input image data.
[out]outDataThe output image data.
[in]extentSix-component array (xmin, xmax, ymin, ymax, zmin, zmax) specifying the region to be processed by this thread.
[in]idThe thread id.

◆ vtkTypeMacro()

vtkMitkLevelWindowFilter::vtkTypeMacro ( vtkMitkLevelWindowFilter  ,
vtkThreadedImageAlgorithm   
)

The documentation for this class was generated from the following file: