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... | |
Private Member Functions | |
| void | updateHistogram () | 
| update the histogram depending on the number of bins  More... | |
Private Attributes | |
| double * | greyLevels | 
| Table containing histogram bins.  More... | |
| double | highestGreyLevel | 
| highest number of grey level (highest value in greyLevels array)  More... | |
| vtkSmartPointer< vtkImageData > | image | 
| currently modeled image  More... | |
| double | maxValue | 
| Min the possible data value (given by the data type of the image)  More... | |
| double | minValue | 
| Min the possible data value (given by the data type of the image)  More... | |
| unsigned int | nbHistoBins | 
| size of greyLevels  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.
References greyLevels, image, maxValue, minValue, nbHistoBins, and updateHistogram().
 Here is the call graph for this function:| ImageLutModel::~ImageLutModel | ( | ) | 
destructor
References greyLevels.
| int ImageLutModel::getBinIndex | ( | double | value | ) | 
image value to the histogram bin index (get the bin index of a given value)
References getBinIndexAsDouble(), and nbHistoBins.
Referenced by updateHistogram().
 Here is the call graph for this function:
 Here is the caller graph for this function:| 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 | 
References maxValue, minValue, and nbHistoBins.
Referenced by ImageLutWidget::drawGraphics(), and getBinIndex().
 Here is the caller graph for this function:| double ImageLutModel::getBinValue | ( | int | index | ) | 
get the number of voxels that end up in a given bin index
References greyLevels, and nbHistoBins.
Referenced by ImageLutWidget::drawGraphics(), and ImageLutWidget::showHistogramTooltip().
 Here is the caller graph for this function:| double ImageLutModel::getLevelFromPercent | ( | int | levelPercent | ) | 
get level value from a percentage
References maxValue, and minValue.
Referenced by ImageLutWidget::levelSliderChanged().
 Here is the caller graph for this function:| double ImageLutModel::getMaxBinValue | ( | ) | 
get the highgest grey level value
References highestGreyLevel.
Referenced by ImageLutWidget::drawGraphics().
 Here is the caller graph for this function:| double ImageLutModel::getMaxValue | ( | ) | 
get the maximal voxel value (lutMax)
References maxValue.
Referenced by ImageLutWidget::initLevel(), ImageLutWidget::initWindow(), ImageLutWidget::resetLUT(), ImageLutWidget::showHistogramTooltip(), and ImageLutWidget::updateBinComboBox().
 Here is the caller graph for this function:| double ImageLutModel::getMinValue | ( | ) | 
get the minimal voxel value (lutMin)
References minValue.
Referenced by ImageLutWidget::initLevel(), ImageLutWidget::initWindow(), ImageLutWidget::resetLUT(), ImageLutWidget::showHistogramTooltip(), and ImageLutWidget::updateBinComboBox().
 Here is the caller graph for this function:| int ImageLutModel::getNumberOfBins | ( | ) | 
get the current number of bins
References nbHistoBins.
Referenced by ImageLutWidget::binComboBoxChanged(), ImageLutWidget::drawGraphics(), ImageLutWidget::showHistogramTooltip(), and ImageLutWidget::updateBinComboBox().
 Here is the caller graph for this function:| int ImageLutModel::getPercentFromLevel | ( | double | level | ) | 
get level value as a percentage between 0 and 100
References maxValue, and minValue.
Referenced by ImageLutWidget::initLevel(), and ImageLutWidget::levelSpinBoxChanged().
 Here is the caller graph for this function:| int ImageLutModel::getPercentFromWindow | ( | double | window | ) | 
get window value as a percentage between 0 and 100
References maxValue, and minValue.
Referenced by ImageLutWidget::initWindow(), and ImageLutWidget::windowSpinBoxChanged().
 Here is the caller graph for this function:| double ImageLutModel::getWindowFromPercent | ( | int | windowPercent | ) | 
get window value from a percentage
References maxValue, and minValue.
Referenced by ImageLutWidget::windowSliderChanged().
 Here is the caller graph for this function:| void ImageLutModel::setNumberOfBins | ( | int | binCount | ) | 
change the number of bins
References maxValue, minValue, nbHistoBins, and updateHistogram().
Referenced by ImageLutWidget::binComboBoxChanged().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  private | 
update the histogram depending on the number of bins
References getBinIndex(), greyLevels, highestGreyLevel, image, and nbHistoBins.
Referenced by ImageLutModel(), and setNumberOfBins().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  private | 
Table containing histogram bins.
Referenced by getBinValue(), ImageLutModel(), updateHistogram(), and ~ImageLutModel().
      
  | 
  private | 
highest number of grey level (highest value in greyLevels array)
Referenced by getMaxBinValue(), and updateHistogram().
      
  | 
  private | 
currently modeled image
Referenced by ImageLutModel(), and updateHistogram().
      
  | 
  private | 
Min the possible data value (given by the data type of the image)
Referenced by getBinIndexAsDouble(), getLevelFromPercent(), getMaxValue(), getPercentFromLevel(), getPercentFromWindow(), getWindowFromPercent(), ImageLutModel(), and setNumberOfBins().
      
  | 
  private | 
Min the possible data value (given by the data type of the image)
Referenced by getBinIndexAsDouble(), getLevelFromPercent(), getMinValue(), getPercentFromLevel(), getPercentFromWindow(), getWindowFromPercent(), ImageLutModel(), and setNumberOfBins().
      
  | 
  private | 
size of greyLevels
Referenced by getBinIndex(), getBinIndexAsDouble(), getBinValue(), getNumberOfBins(), ImageLutModel(), setNumberOfBins(), and updateHistogram().