![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Dicom/GUI/DatasetPreviewLabel.h>
A widget that shows a preview image of a DICOM dataset. More...
Inheritance diagram for DatasetPreviewLabel:A widget that shows a preview image of a DICOM dataset.
This widget only works together with a DicomBrowserModel. The dataset for the preview is determined by a QModelIndex through setCurrent. An index pointing to an Image will use the Image's uri directly. If the index is a Series, the middle image is used by default. Additionally the user can scroll through the images of a series with the mouse wheel. The preview image is computed async and a placeholder is displayed until the image is available.
Public Slots | |
| void | setCurrent (const QModelIndex &index) |
| An index which should be previewed. | |
Signals | |
| void | imageIndexChanged (int) |
Public Member Functions | |
| DatasetPreviewLabel (QWidget *parent=nullptr) | |
| DatasetPreviewLabel (DicomBrowserModel *model, QWidget *parent) | |
| void | setModel (DicomBrowserModel *model) |
| The label will use the DatasetCache of the model to load DICOMs. | |
| int | thumbnailSize () const |
| Size in pixels of the preview image. | |
| QImage | thumbnail () const |
| Return the generated preview image. | |
| void | setLoadingPlaceholder (QMovie *movie) |
| The placeholder that is displayed while the actual image is loaded, e.g. a spinner. | |
| void | setErrorPlaceholder (const QPixmap &image) |
| The placeholder that is displayed if no preview could be generated. | |
| int | imageIndex () const |
| int | framesCount () const |
| If a series with multiple images is selected, returns the number of images If a series containing a single multi-frame image or a multi-frame image are selected, returns the number of frames in that image. | |
| void | setImageIndex (int index) |
| Sets the current image index. | |
| QImage thumbnail | ( | ) | const |
Return the generated preview image.
This will block until the preview image is available and will therefore never return the loadingPlaceholder. It might return the error placeholder.
|
slot |
An index which should be previewed.
A preview is only generated for Series and Image indices, otherwise the error placeholder is displayed. This must be an index of a DicomBrowserModel or a proxy that wraps a DicomBrowserModel.