Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(faq): FAQ and Segmentation Mode Fix for some studies #3762

Merged
merged 13 commits into from
Nov 3, 2023
4 changes: 2 additions & 2 deletions extensions/cornerstone-dicom-seg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.20.3",
"@cornerstonejs/tools": "^1.20.3",
"@cornerstonejs/adapters": "^1.27.3",
"@cornerstonejs/tools": "^1.27.3",
"@kitware/vtk.js": "27.3.1",
"react-color": "^2.19.3"
}
Expand Down
8 changes: 4 additions & 4 deletions extensions/cornerstone-dicom-sr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"@ohif/extension-cornerstone": "3.8.0-beta.9",
"@ohif/extension-measurement-tracking": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
"react": "^17.0.2"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.20.3",
"@cornerstonejs/core": "^1.20.3",
"@cornerstonejs/tools": "^1.20.3",
"@cornerstonejs/adapters": "^1.27.3",
"@cornerstonejs/core": "^1.27.3",
"@cornerstonejs/tools": "^1.27.3",
"classnames": "^2.3.2"
}
}
10 changes: 5 additions & 5 deletions extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.20.3",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
Expand All @@ -52,10 +52,10 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.20.3",
"@cornerstonejs/core": "^1.20.3",
"@cornerstonejs/streaming-image-volume-loader": "^1.20.3",
"@cornerstonejs/tools": "^1.20.3",
"@cornerstonejs/adapters": "^1.27.3",
"@cornerstonejs/core": "^1.27.3",
"@cornerstonejs/streaming-image-volume-loader": "^1.27.3",
"@cornerstonejs/tools": "^1.27.3",
"@kitware/vtk.js": "27.3.1",
"html2canvas": "^1.4.1",
"lodash.debounce": "4.0.8",
Expand Down
8 changes: 4 additions & 4 deletions extensions/cornerstone/src/init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default async function init({

await cs3DInit({
rendering: {
preferSizeOverAccuracy: Boolean(appConfig.use16BitDataType),
useNorm16Texture: Boolean(appConfig.use16BitDataType),
preferSizeOverAccuracy: Boolean(appConfig.preferSizeOverAccuracy),
useNorm16Texture: Boolean(appConfig.useNorm16Texture),
},
});

Expand Down Expand Up @@ -308,8 +308,8 @@ export default async function init({
viewportGridService.subscribe(
viewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED,
activeViewportEventListener
);
}
);
}

function CPUModal() {
return (
Expand Down
3 changes: 2 additions & 1 deletion extensions/cornerstone/src/initWADOImageLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export default function initWADOImageLoader(
// Until the default is set to true (which is the case for cornerstone3D),
// we should set this flag to false.
convertFloatPixelDataToInt: false,
use16BitDataType: Boolean(appConfig.use16BitDataType),
use16BitDataType:
Boolean(appConfig.useNorm16Texture) || Boolean(appConfig.preferSizeOverAccuracy),
},
beforeSend: function (xhr) {
//TODO should be removed in the future and request emitted by DicomWebDataSource
Expand Down
2 changes: 1 addition & 1 deletion extensions/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/i18n": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.2",
"prop-types": "^15.6.2",
"react": "^17.0.2",
Expand Down
8 changes: 7 additions & 1 deletion extensions/default/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ export default function init({ servicesManager, configuration = {} }): void {
const handlePETImageMetadata = ({ SeriesInstanceUID, StudyInstanceUID }) => {
const { instances } = DicomMetadataStore.getSeries(StudyInstanceUID, SeriesInstanceUID);

if (!instances?.length) {
return;
}

const modality = instances[0].Modality;
if (modality !== 'PT') {

if (!modality || modality !== 'PT') {
return;
}

const imageIds = instances.map(instance => instance.imageId);
const instanceMetadataArray = [];
imageIds.forEach(imageId => {
Expand Down
2 changes: 1 addition & 1 deletion extensions/dicom-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/dicom-video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
6 changes: 3 additions & 3 deletions extensions/measurement-tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@cornerstonejs/core": "^1.20.3",
"@cornerstonejs/tools": "^1.20.3",
"@cornerstonejs/core": "^1.27.3",
"@cornerstonejs/tools": "^1.27.3",
"@ohif/core": "3.8.0-beta.9",
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"classnames": "^2.3.2",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"lodash.debounce": "^4.17.21",
"prop-types": "^15.6.2",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/tmtv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
11 changes: 9 additions & 2 deletions modes/segmentation/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,16 @@ function modeFactory({ modeConfiguration }) {
},
/**
* A boolean return value that indicates whether the mode is valid for the
* modalities of the selected studies. For instance a PET/CT mode should be
* modalities of the selected studies. Currently we don't have stack viewport
* segmentations and we should exclude them
*/
isValidMode: ({ modalities }) => true,
isValidMode: ({ modalities }) => {
if (modalities.length === 1) {
return !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalities[0]);
}

return true;
},
/**
* Mode Routes are used to define the mode's behavior. A list of Mode Route
* that includes the mode's path and the layout to be used. The layout will
Expand Down
4 changes: 2 additions & 2 deletions platform/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.20.3",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/core": "3.8.0-beta.9",
"@ohif/extension-cornerstone": "3.8.0-beta.9",
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.9",
Expand All @@ -72,7 +72,7 @@
"classnames": "^2.3.2",
"core-js": "^3.16.1",
"cornerstone-math": "^0.1.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"detect-gpu": "^4.0.16",
"dicom-parser": "^1.8.9",
"dotenv-webpack": "^1.7.0",
Expand Down
2 changes: 1 addition & 1 deletion platform/app/public/config/default_16bit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ window.config = {
showWarningMessageForCrossOrigin: false,
showCPUFallbackMessage: true,
showLoadingIndicator: true,
use16BitDataType: true,
useNorm16Texture: true,
useSharedArrayBuffer: 'AUTO',
maxNumRequests: {
interaction: 100,
Expand Down
4 changes: 2 additions & 2 deletions platform/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.20.3",
"@cornerstonejs/dicom-image-loader": "^1.27.3",
"@ohif/ui": "3.8.0-beta.9",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.2",
"gl-matrix": "^3.4.3",
"isomorphic-base64": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class DisplaySetService extends PubSubService {
};

public activeDisplaySets = [];
public unsuportedSOPClassHandler;
public unsupportedSOPClassHandler;
extensionManager: ExtensionManager;

protected activeDisplaySetsMap = new Map<string, DisplaySet>();
Expand All @@ -47,7 +47,7 @@ export default class DisplaySetService extends PubSubService {

constructor() {
super(EVENTS);
this.unsuportedSOPClassHandler =
this.unsupportedSOPClassHandler =
'@ohif/extension-default.sopClassHandlerModule.not-supported-display-sets-handler';
}

Expand Down Expand Up @@ -81,7 +81,7 @@ export default class DisplaySetService extends PubSubService {
* @param sopClassHandlerUID
*/
public setUnsuportedSOPClassHandler(sopClassHandler) {
this.unsuportedSOPClassHandler = sopClassHandler;
this.unsupportedSOPClassHandler = sopClassHandler;
}

/**
Expand Down Expand Up @@ -384,7 +384,7 @@ export default class DisplaySetService extends PubSubService {
// applying the default sopClassUID handler
if (allDisplaySets.length === 0) {
// applying hp-defined viewport settings to the displaysets
const handler = this.extensionManager.getModuleEntry(this.unsuportedSOPClassHandler);
const handler = this.extensionManager.getModuleEntry(this.unsupportedSOPClassHandler);
const displaySets = handler.getDisplaySetsFromSeries(instances);
if (displaySets?.length) {
displaySets.forEach(ds => {
Expand Down
10 changes: 5 additions & 5 deletions platform/core/src/utils/isDisplaySetReconstructable.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default function isDisplaySetReconstructable(instances) {
if (!instances.length) {
return { value: false };
}

const firstInstance = instances[0];

const Modality = firstInstance.Modality;
const isMultiframe = firstInstance.NumberOfFrames > 1;

if (!constructableModalities.includes(Modality)) {
return { value: false };
}
// This seems to not be a reasonable check. We should just use the geometry
sedghi marked this conversation as resolved.
Show resolved Hide resolved
// const Modality = firstInstance.Modality;
// if (!constructableModalities.includes(Modality)) {
// return { value: false };
// }

// Can't reconstruct if we only have one image.
if (!isMultiframe && instances.length === 1) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platform/docs/docs/assets/img/large-pt-ct.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platform/docs/docs/assets/img/webgl-int16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion platform/docs/docs/configuration/configurationFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ if auth headers are used, a preflight request is required.
}
```
- `showLoadingIndicator`: (default to true), if set to false, the loading indicator will not be shown when navigating between studies.
- `use16BitDataType`: (default to false), if set to true, it will use 16 bit data type for the image data wherever possible which has
- `useNorm16Texture`: (default to false), if set to true, it will use 16 bit data type for the image data wherever possible which has
significant impact on reducing the memory usage. However, the 16Bit textures require EXT_texture_norm16 extension in webGL 2.0 (you can check if you have it here https://webglreport.com/?v=2). In addition to the extension, there are reported problems for Intel Macs that might cause the viewer to crash. In summary, it is great a configuration if you have support for it.
- `useSharedArrayBuffer` (default to 'TRUE', options: 'AUTO', 'FALSE', 'TRUE', note that these are strings), for volume loading we use sharedArrayBuffer to be able to
load the volume progressively as the data arrives (each webworker has the shared buffer and can write to it). However, there might be certain environments that do not support sharedArrayBuffer. In that case, you can set this flag to false and the viewer will use the regular arrayBuffer which might be slower for large volume loading.
Expand Down
Loading
Loading