Computer Assisted Medical Intervention Tool Kit  version 5.2
ImageLutModel Class Reference

The class ImageLutModel model the histogram of a given vtkImageData. More...

#include <ImageLutModel.h>

+ Collaboration diagram for ImageLutModel:

Public Member Functions

int getBinIndex (double)
 image value to the histogram bin index (get the bin index of a given value) More...
 
double getBinIndexAsDouble (double value, bool checkBound=true)
 image value to the histogram value (required to show the current level/window values on the graph) More...
 
double getBinValue (int)
 get the number of voxels that end up in a given bin index More...
 
double getLevelFromPercent (int)
 get level value from a percentage More...
 
double getMaxBinValue ()
 get the highgest grey level value More...
 
double getMaxValue ()
 get the maximal voxel value (lutMax) More...
 
double getMinValue ()
 get the minimal voxel value (lutMin) More...
 
int getNumberOfBins ()
 get the current number of bins More...
 
int getPercentFromLevel (double)
 get level value as a percentage between 0 and 100 More...
 
int getPercentFromWindow (double)
 get window value as a percentage between 0 and 100 More...
 
double getWindowFromPercent (int)
 get window value from a percentage More...
 
 ImageLutModel (vtkSmartPointer< vtkImageData >)
 Constructor: set the image data. More...
 
void setNumberOfBins (int)
 change the number of bins More...
 
 ~ImageLutModel ()
 destructor More...
 

Detailed Description

The class ImageLutModel model the histogram of a given vtkImageData.

Uses double data type to manage the histogram. This allows for managin properly all type of voxel datatype.

Note
The ui is defined in the corresponding ImageLutWidget.ui

Constructor & Destructor Documentation

◆ ImageLutModel()

ImageLutModel::ImageLutModel ( vtkSmartPointer< vtkImageData >  image)

Constructor: set the image data.

◆ ~ImageLutModel()

ImageLutModel::~ImageLutModel ( )

destructor

Member Function Documentation

◆ getBinIndex()

int ImageLutModel::getBinIndex ( double  value)

image value to the histogram bin index (get the bin index of a given value)

References getBinIndexAsDouble().

+ Here is the call graph for this function:

◆ getBinIndexAsDouble()

double ImageLutModel::getBinIndexAsDouble ( double  value,
bool  checkBound = true 
)

image value to the histogram value (required to show the current level/window values on the graph)

Parameters
checkBoundif true, then value below lutMin and over lutMax return 0 and getNumberOfBins() - 1 respectively
valuethe pixel/voxel value to check the bin of

Referenced by getBinIndex().

+ Here is the caller graph for this function:

◆ getBinValue()

double ImageLutModel::getBinValue ( int  index)

get the number of voxels that end up in a given bin index

Referenced by ImageLutWidget::showHistogramTooltip().

+ Here is the caller graph for this function:

◆ getLevelFromPercent()

double ImageLutModel::getLevelFromPercent ( int  levelPercent)

get level value from a percentage

◆ getMaxBinValue()

double ImageLutModel::getMaxBinValue ( )

get the highgest grey level value

◆ getMaxValue()

double ImageLutModel::getMaxValue ( )

get the maximal voxel value (lutMax)

Referenced by ImageLutWidget::showHistogramTooltip().

+ Here is the caller graph for this function:

◆ getMinValue()

double ImageLutModel::getMinValue ( )

get the minimal voxel value (lutMin)

Referenced by ImageLutWidget::showHistogramTooltip().

+ Here is the caller graph for this function:

◆ getNumberOfBins()

int ImageLutModel::getNumberOfBins ( )

get the current number of bins

Referenced by ImageLutWidget::showHistogramTooltip().

+ Here is the caller graph for this function:

◆ getPercentFromLevel()

int ImageLutModel::getPercentFromLevel ( double  level)

get level value as a percentage between 0 and 100

◆ getPercentFromWindow()

int ImageLutModel::getPercentFromWindow ( double  window)

get window value as a percentage between 0 and 100

◆ getWindowFromPercent()

double ImageLutModel::getWindowFromPercent ( int  windowPercent)

get window value from a percentage

◆ setNumberOfBins()

void ImageLutModel::setNumberOfBins ( int  binCount)

change the number of bins


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