longitudinal mode to use "tracked" thumbnails
This commit is contained in:
1 parent
d557acbb40
commit
38e60e297b
6 files changed
+37
-51
No files matched your search
+1
-2
@@ -212,7 +212,7 @@ function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
|
||||
date: ds.SeriesDate,
|
||||
numInstances: ds.numImageFrames,
|
||||
StudyInstanceUID: ds.StudyInstanceUID,
|
||||
componentType: 'thumbnail', // 'thumbnailNoImage' || 'thumbnailTracked' // TODO: PUT THIS SOMEWHERE ELSE
|
||||
componentType: 'thumbnailTracked', // 'thumbnailNoImage' || 'thumbnail' // TODO: PUT THIS SOMEWHERE ELSE
|
||||
imageSrc,
|
||||
dragData: {
|
||||
type: 'displayset',
|
||||
@@ -223,7 +223,6 @@ function _mapDisplaySets(displaySets, thumbnailImageSrcMap) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string[]} primaryStudyInstanceUIDs
|
||||
|
||||
@@ -155,29 +155,12 @@ class OHIFCornerstoneViewport extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
const debouncedNewImageHandler = debounce(
|
||||
({ currentImageIdIndex, sopInstanceUid }) => {
|
||||
const { displaySet } = this.props;
|
||||
const { StudyInstanceUID } = displaySet;
|
||||
if (currentImageIdIndex > 0) {
|
||||
this.props.onNewImage({
|
||||
StudyInstanceUID,
|
||||
SOPInstanceUID: sopInstanceUid,
|
||||
frameIndex: currentImageIdIndex,
|
||||
activeViewportIndex: viewportIndex,
|
||||
});
|
||||
}
|
||||
},
|
||||
700
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<CornerstoneViewport
|
||||
viewportIndex={viewportIndex}
|
||||
imageIds={imageIds}
|
||||
imageIdIndex={currentImageIdIndex}
|
||||
onNewImage={debouncedNewImageHandler}
|
||||
// TODO: ViewportGrid Context?
|
||||
isActive={true} // todo
|
||||
isStackPrefetchEnabled={true} // todo
|
||||
|
||||
@@ -13,19 +13,7 @@ const OHIFCornerstoneViewport = props => {
|
||||
};
|
||||
|
||||
function getViewportModule({ commandsManager }) {
|
||||
const ExtendedOHIFCornerstoneViewport = props => {
|
||||
const onNewImageHandler = jumpData => {
|
||||
alert('here we are!')
|
||||
commandsManager.runCommand('jumpToImage', jumpData);
|
||||
};
|
||||
return (
|
||||
<OHIFCornerstoneViewport {...props} onNewImage={onNewImageHandler} />
|
||||
);
|
||||
};
|
||||
|
||||
return [
|
||||
{ name: 'cornerstone-tracked', component: ExtendedOHIFCornerstoneViewport },
|
||||
];
|
||||
};
|
||||
return [{ name: 'cornerstone-tracked', component: OHIFCornerstoneViewport }];
|
||||
}
|
||||
|
||||
export default getViewportModule;
|
||||
Reference in new issue
Block a user