![]() |
Computer Assited Medical Intervention Tool Kit
|
The class ImageLutWidget defines a widget controling the Look Up Table of an instance of ImageComponent. More...
#include <ImageLutWidget.h>
Public Member Functions | |
| ImageLutWidget (QWidget *parent=0) | |
| Default construtor. | |
| void | updateComponent (ImageComponent *) |
| load the LUT data using the LUT from the image component | |
| ~ImageLutWidget () | |
| destructor | |
Protected Member Functions | |
| virtual void | resizeEvent (QResizeEvent *) |
| overwritten from QWidget to ensure fit in view | |
| virtual void | showEvent (QShowEvent *) |
| overwritten from QWidget to ensure fit in view | |
Private Slots | |
| void | applyLUT () |
| Update the component LUT using the GUI values. | |
| void | invertButtonClicked () |
| Slot called when the invert button is clicked. | |
| void | lineEditLUTLevelChanged () |
| Slot called when the line edit for the lut level has changed. | |
| void | lineEditLUTWindowChanged () |
| Slot called when the line edit for the window width has changed. | |
| virtual void | resetLUT () |
| Slot that reset changed applied to the LUT. | |
| void | setMaxColor () |
| slot called when the max color button is clicked | |
| void | setMinColor () |
| slot called when the min color button is clicked | |
| void | sliderLUTLevelChanged (int) |
| Slot called when the slider for the lut level has changed. | |
| void | sliderLUTWindowChanged (int) |
| Slot called when the slider for the window width has changed. | |
Private Member Functions | |
| void | blockAllSignals (bool) |
| block/unblock signals for all the GUI widgets | |
| void | draw () |
| draws the histogram and LUT graphic representation | |
| template<class DATATYPE > | |
| void | fillHistogramTable (DATATYPE *data, unsigned int dataDim, DATATYPE minVal, DATATYPE maxVal) |
| fill the data for the histogram | |
| void | fitView () |
| ensure that all graphics are completely visible and only that | |
| void | initLevelGUI (int min, int max, int value) |
| Init level slider and text with its minimum, maximum and current value. | |
| void | initSlider (QSlider *slider, int min, int max, int value) |
| init a slider | |
| void | initWindowGUI (int min, int max, int value) |
| Init window slider and text with its minimum, maximum and current value. | |
| void | updateGradient () |
| update the gradient display in the widget | |
Private Attributes | |
| unsigned int * | greyLevels |
| Table containing histogram bins. | |
| unsigned int | highestGreyLevel |
| highest number of grey level (highest value in greyLevels array) | |
| bool | invert |
| does the user asked for an invert LUT | |
| double | lutMax |
| Min the possible data value (given by the data type of the image) | |
| double | lutMin |
| Min the possible data value (given by the data type of the image) | |
| ImageComponent * | myComponent |
| the current ImageComponent | |
| int | nbHistoBins |
| size of greyLevels | |
| QGraphicsRectItem * | sceneRectItem |
| the graphics item around all other item in the graphics view | |
| Ui::ui_ImageLutWidget | ui |
| the Qt GUI (build by ImageLutWidget.ui) | |
The class ImageLutWidget defines a widget controling the Look Up Table of an instance of ImageComponent.
The ui is defined in the corresponding ImageLutWidget.ui
| ImageLutWidget::ImageLutWidget | ( | QWidget * | parent = 0 | ) |
Default construtor.
References applyLUT(), greyLevels, initSlider(), invertButtonClicked(), lineEditLUTLevelChanged(), lineEditLUTWindowChanged(), lutMax, lutMin, myComponent, nbHistoBins, resetLUT(), setMaxColor(), setMinColor(), sliderLUTLevelChanged(), sliderLUTWindowChanged(), and ui.
| ImageLutWidget::~ImageLutWidget | ( | ) |
destructor
References greyLevels.
|
privateslot |
Update the component LUT using the GUI values.
References draw(), camitk::ImageComponent::getLut(), invert, myComponent, camitk::ImageComponent::refresh(), and ui.
Referenced by ImageLutWidget(), invertButtonClicked(), lineEditLUTLevelChanged(), lineEditLUTWindowChanged(), resetLUT(), setMaxColor(), setMinColor(), sliderLUTLevelChanged(), sliderLUTWindowChanged(), and updateComponent().
|
private |
block/unblock signals for all the GUI widgets
References ui.
Referenced by lineEditLUTLevelChanged(), lineEditLUTWindowChanged(), resetLUT(), sliderLUTLevelChanged(), sliderLUTWindowChanged(), and updateComponent().
|
private |
draws the histogram and LUT graphic representation
References fitView(), camitk::ImageComponent::getImageData(), camitk::ImageComponent::getLut(), greyLevels, highestGreyLevel, myComponent, nbHistoBins, sceneRectItem, and ui.
Referenced by applyLUT().
|
private |
fill the data for the histogram
References greyLevels, highestGreyLevel, and nbHistoBins.
|
private |
ensure that all graphics are completely visible and only that
References sceneRectItem, and ui.
Referenced by draw(), resizeEvent(), and showEvent().
|
private |
Init level slider and text with its minimum, maximum and current value.
References initSlider(), and ui.
Referenced by resetLUT(), and updateComponent().
|
private |
init a slider
Referenced by ImageLutWidget(), initLevelGUI(), and initWindowGUI().
|
private |
Init window slider and text with its minimum, maximum and current value.
References initSlider(), and ui.
Referenced by resetLUT(), and updateComponent().
|
privateslot |
Slot called when the invert button is clicked.
References applyLUT(), invert, and updateGradient().
Referenced by ImageLutWidget().
|
privateslot |
Slot called when the line edit for the lut level has changed.
References applyLUT(), blockAllSignals(), and ui.
Referenced by ImageLutWidget().
|
privateslot |
Slot called when the line edit for the window width has changed.
References applyLUT(), blockAllSignals(), and ui.
Referenced by ImageLutWidget().
|
privatevirtualslot |
Slot that reset changed applied to the LUT.
References applyLUT(), blockAllSignals(), initLevelGUI(), initWindowGUI(), invert, lutMax, lutMin, and ui.
Referenced by ImageLutWidget().
|
protectedvirtual |
|
privateslot |
slot called when the max color button is clicked
References applyLUT(), ui, and updateGradient().
Referenced by ImageLutWidget().
|
privateslot |
slot called when the min color button is clicked
References applyLUT(), ui, and updateGradient().
Referenced by ImageLutWidget().
|
protectedvirtual |
|
privateslot |
Slot called when the slider for the lut level has changed.
References applyLUT(), blockAllSignals(), and ui.
Referenced by ImageLutWidget().
|
privateslot |
Slot called when the slider for the window width has changed.
References applyLUT(), blockAllSignals(), and ui.
Referenced by ImageLutWidget().
| void ImageLutWidget::updateComponent | ( | ImageComponent * | comp | ) |
load the LUT data using the LUT from the image component
References applyLUT(), blockAllSignals(), camitk::ImageComponent::getImageData(), camitk::ImageComponent::getLut(), initLevelGUI(), initWindowGUI(), invert, lutMax, lutMin, myComponent, ui, and updateGradient().
|
private |
update the gradient display in the widget
References ui.
Referenced by invertButtonClicked(), setMaxColor(), setMinColor(), and updateComponent().
|
private |
Table containing histogram bins.
Referenced by draw(), fillHistogramTable(), ImageLutWidget(), and ~ImageLutWidget().
|
private |
highest number of grey level (highest value in greyLevels array)
Referenced by draw(), and fillHistogramTable().
|
private |
does the user asked for an invert LUT
Referenced by applyLUT(), invertButtonClicked(), resetLUT(), and updateComponent().
|
private |
Min the possible data value (given by the data type of the image)
Referenced by ImageLutWidget(), resetLUT(), and updateComponent().
|
private |
Min the possible data value (given by the data type of the image)
Referenced by ImageLutWidget(), resetLUT(), and updateComponent().
|
private |
the current ImageComponent
Referenced by applyLUT(), draw(), ImageLutWidget(), and updateComponent().
|
private |
size of greyLevels
Referenced by draw(), fillHistogramTable(), and ImageLutWidget().
|
private |
|
private |
the Qt GUI (build by ImageLutWidget.ui)
Referenced by applyLUT(), blockAllSignals(), draw(), fitView(), ImageLutWidget(), initLevelGUI(), initWindowGUI(), lineEditLUTLevelChanged(), lineEditLUTWindowChanged(), resetLUT(), setMaxColor(), setMinColor(), sliderLUTLevelChanged(), sliderLUTWindowChanged(), updateComponent(), and updateGradient().
1.8.1.2