The class ImageLutModel model the histogram of a given vtkImageData. More...
#include <ImageLutModel.h>
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... | |
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.
ImageLutModel::ImageLutModel | ( | vtkSmartPointer< vtkImageData > | image | ) |
Constructor: set the image data.
ImageLutModel::~ImageLutModel | ( | ) |
destructor
int ImageLutModel::getBinIndex | ( | double | value | ) |
image value to the histogram bin index (get the bin index of a given value)
References 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)
checkBound | if true, then value below lutMin and over lutMax return 0 and getNumberOfBins() - 1 respectively |
value | the pixel/voxel value to check the bin of |
Referenced by getBinIndex().
double ImageLutModel::getBinValue | ( | int | index | ) |
get the number of voxels that end up in a given bin index
Referenced by ImageLutWidget::showHistogramTooltip().
double ImageLutModel::getLevelFromPercent | ( | int | levelPercent | ) |
get level value from a percentage
double ImageLutModel::getMaxBinValue | ( | ) |
get the highgest grey level value
double ImageLutModel::getMaxValue | ( | ) |
get the maximal voxel value (lutMax)
Referenced by ImageLutWidget::showHistogramTooltip().
double ImageLutModel::getMinValue | ( | ) |
get the minimal voxel value (lutMin)
Referenced by ImageLutWidget::showHistogramTooltip().
int ImageLutModel::getNumberOfBins | ( | ) |
get the current number of bins
Referenced by ImageLutWidget::showHistogramTooltip().
int ImageLutModel::getPercentFromLevel | ( | double | level | ) |
get level value as a percentage between 0 and 100
int ImageLutModel::getPercentFromWindow | ( | double | window | ) |
get window value as a percentage between 0 and 100
double ImageLutModel::getWindowFromPercent | ( | int | windowPercent | ) |
get window value from a percentage
void ImageLutModel::setNumberOfBins | ( | int | binCount | ) |
change the number of bins