fix(microscopy): viewport's overview panel - zoom marker (#3415)

* fix microscopy viewport's overview panel - zoom marker

* comment
This commit is contained in:
M.D 2023-05-23 21:20:32 -04:00 committed by GitHub
parent 685520acab
commit 770c677394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
.DicomMicroscopyViewer {
--ol-partial-background-color: rgba(127, 127, 127, 0.7);
--ol-foreground-color: #000000;
--ol-subtle-foreground-color: #000;
--ol-subtle-background-color: rgba(78, 78, 78, 0.5);
}
.DicomMicroscopyViewer .ol-box {
box-sizing: border-box;
border-radius: 2px;
@ -332,7 +339,7 @@
}
.DicomMicroscopyViewer .ol-overviewmap-box {
border: 1.5px dotted var(--ol-subtle-foreground-color);
border: 0.5px dotted var(--ol-subtle-foreground-color);
}
.DicomMicroscopyViewer .ol-overviewmap .ol-overviewmap-box:hover {

View File

@ -164,7 +164,14 @@ class DicomMicroscopyViewport extends Component {
const image = new metadataUtils.VLWholeSlideMicroscopyImage({
metadata: inst,
});
const imageFlavor = image.ImageType[2];
// NOTE: depending on different data source, image.ImageType sometimes
// is a string, not a string array.
const imageType =
typeof image.ImageType === 'string'
? image.ImageType.split('\\')
: image.ImageType;
const imageFlavor = imageType[2];
if (imageFlavor === 'VOLUME' || imageFlavor === 'THUMBNAIL') {
volumeImages.push(image);
}