Closed kbressem closed 3 years ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Consider to change 'continuous_update' of the range_slider of DicomExplorer to 'False' because otherwise UI seems to be laggy and changes are visualized very slow.
Implementing a simple DICOM viewer as iPython Widget.
Mentioned in #20
Motivation
Currently, the 3D volumes were displayed as multiple tiles in a mosaic style. But this is not how a radiologist looks at images. Instead, radiologists view images as a scrollable stack of 2D slices.
Solution
iPywidgets allows rendering one stack of image slices into a scrollable widget.
With the left lower slider, one can scroll through the image stack; with the upper slider, it is possible to apply windowing to the images. If a segmentation mask is passed together with the image, it can be overlayed to the image. With the lower right button, the mask overlay can be toggled on or off.
This simple DICOM viewer is now used as a replacement for the
show_batch_3d
function.Additionally, another viewer version gives more details on the pixel/voxel distribution in the image. This could be useful for visualizing DICOM images while preprocessing (normalizing, bias correction).
Files changed
09_widgets.viewer
to notebooksshow_batch_3d
in04_dataloaders
dev_nbs
andnbs
folder