Skip to content

Commit

Permalink
Merge pull request OHIF#51 from ImagingDataCommons/sandbox
Browse files Browse the repository at this point in the history
Sandbox
  • Loading branch information
wlongabaugh authored Dec 10, 2020
2 parents 1bd46ce + c7d0d06 commit f79af52
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 16 deletions.
11 changes: 11 additions & 0 deletions extensions/dicom-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)


### Bug Fixes

* panel issues and mpr button (IDC2122-IDC2117) ([32022f5](https://github.com/OHIF/Viewers/commit/32022f51f2d24f53f4c98188980db038a6dfe76c))





# [0.6.0](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)


Expand Down
2 changes: 1 addition & 1 deletion extensions/dicom-rt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-rt",
"version": "0.6.0",
"version": "0.6.1",
"description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.",
"author": "OHIF",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions extensions/dicom-rt/src/OHIFDicomRTStructSopClassHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const OHIFDicomRTStructSopClassHandler = {
id: 'OHIFDicomRTStructSopClassHandler',
type: MODULE_TYPES.SOP_CLASS_HANDLER,
sopClassUIDs,
getDisplaySetFromSeries: function(
getDisplaySetFromSeries: function (
series,
study,
dicomWebClient,
Expand Down Expand Up @@ -71,11 +71,11 @@ const OHIFDicomRTStructSopClassHandler = {
}
}

rtStructDisplaySet.getSourceDisplaySet = function(studies) {
rtStructDisplaySet.getSourceDisplaySet = function (studies) {
return getSourceDisplaySet(studies, rtStructDisplaySet);
};

rtStructDisplaySet.load = function(referencedDisplaySet, studies) {
rtStructDisplaySet.load = function (referencedDisplaySet, studies) {
return loadRTStruct(
rtStructDisplaySet,
referencedDisplaySet,
Expand Down
2 changes: 2 additions & 0 deletions extensions/dicom-rt/src/components/RTPanel/RTPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ const RTPanel = ({
* without subscribing to external events.
*/
useEffect(() => {
updateStructureSets();

document.addEventListener('extensiondicomrtrtloaded', updateStructureSets);

return () => {
Expand Down
7 changes: 6 additions & 1 deletion extensions/dicom-rt/src/loadRTStruct.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ export default async function loadRTStruct(
imageIdSopInstanceUidPairs
);
const imageId = _getImageId(imageIdSopInstanceUidPairs, sopInstanceUID);

if (!imageId) {
continue;
}

const imageIdSpecificToolData = _getOrCreateImageIdSpecificToolData(
toolState,
imageId,
Expand Down Expand Up @@ -294,7 +299,7 @@ const _getImageId = (imageIdSopInstanceUidPairs, sopInstanceUID) => {
imageIdSopInstanceUidPairsEntry.sopInstanceUID === sopInstanceUID
);

return imageIdSopInstanceUidPairsEntry.imageId;
return imageIdSopInstanceUidPairsEntry ? imageIdSopInstanceUidPairsEntry.imageId : null;
};

function _getImageIdSopInstanceUidPairsForDisplaySet(
Expand Down
11 changes: 11 additions & 0 deletions extensions/vtk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.10.1](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)


### Bug Fixes

* panel issues and mpr button (IDC2122-IDC2117) ([32022f5](https://github.com/OHIF/Viewers/commit/32022f51f2d24f53f4c98188980db038a6dfe76c))





# [1.10.0](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)


Expand Down
2 changes: 1 addition & 1 deletion extensions/vtk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "1.10.0",
"version": "1.10.1",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
Expand Down
20 changes: 13 additions & 7 deletions extensions/vtk/src/toolbarComponents/VTKMPRToolbarButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
// A better heuristic would be checking 4D tags, e.g. the presence of multiple TemporalPositionIdentifier values.
// However, some studies (e.g. https://github.com/OHIF/Viewers/issues/2113) do not have such tags.

for (let ii = 0; ii < displaySet.numImageFrames; ++ii){
const imageIdControl = displaySet.images[ii].getImageId()
for (let ii = 0; ii < displaySet.numImageFrames; ++ii) {
const image = displaySet.images[ii];
if (!image) continue;

const imageIdControl = image.getImageId()
const instanceMetadataControl = cornerstone.metaData.get('instance', imageIdControl)

if (!instanceMetadataControl ||
instanceMetadataControl === undefined ||
!instanceMetadataControl.ImagePositionPatient ||
instanceMetadataControl.ImagePositionPatient === undefined ) {
instanceMetadataControl.ImagePositionPatient === undefined) {
// if ImagePositionPatient is missing, skip the 4D datasets check.
// do not return false, because it could be a 3D dataset.
continue;
Expand All @@ -58,8 +61,11 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
let yImagePositionPatientControl = instanceMetadataControl.ImagePositionPatient[1];
let zImagePositionPatientControl = instanceMetadataControl.ImagePositionPatient[2];

for (let jj = ii + 1; jj < displaySet.numImageFrames; ++jj){
const imageId = displaySet.images[jj].getImageId()
for (let jj = ii + 1; jj < displaySet.numImageFrames; ++jj) {
const image = displaySet.images[jj];
if (!image) continue;

const imageId = image.getImageId()
const instanceMetadata = cornerstone.metaData.get('instance', imageId)

if (!instanceMetadata ||
Expand All @@ -76,8 +82,8 @@ const _isDisplaySetReconstructable = (viewportSpecificData = {}, activeViewportI
let zImagePositionPatient = instanceMetadata.ImagePositionPatient[2];

if (xImagePositionPatientControl === xImagePositionPatient &&
yImagePositionPatientControl === yImagePositionPatient &&
zImagePositionPatientControl === zImagePositionPatient){
yImagePositionPatientControl === yImagePositionPatient &&
zImagePositionPatientControl === zImagePositionPatient) {
return false;
}
}
Expand Down
8 changes: 8 additions & 0 deletions platform/viewer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.8.1](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)

**Note:** Version bump only for package @ohif/viewer





# [4.8.0](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-12-10)


Expand Down
6 changes: 3 additions & 3 deletions platform/viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "4.8.0",
"version": "4.8.1",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
Expand Down Expand Up @@ -55,10 +55,10 @@
"@ohif/extension-dicom-html": "^1.3.0",
"@ohif/extension-dicom-microscopy": "^0.51.3",
"@ohif/extension-dicom-pdf": "^1.0.6",
"@ohif/extension-dicom-rt": "^0.6.0",
"@ohif/extension-dicom-rt": "^0.6.1",
"@ohif/extension-dicom-segmentation": "^0.5.0",
"@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.10.0",
"@ohif/extension-vtk": "^1.10.1",
"@ohif/i18n": "^0.53.0",
"@ohif/ui": "^1.8.0",
"@tanem/react-nprogress": "^1.1.25",
Expand Down

0 comments on commit f79af52

Please sign in to comment.