Bug Fix: Default timpoint protocol for LT not being applied + Lesions not being correctly selected on jumpToRowItem function.
This commit is contained in:
1 parent
e1cc8adbad
commit
2a6cb42228
5 files changed
+51
-10
No files matched your search
@@ -2,6 +2,8 @@ import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
|
||||
const { InstanceMetadata, StudySummary } = Viewerbase.metadata;
|
||||
|
||||
// TODO: [LT-refactor] move this to ohif:hanging-protocols package
|
||||
/**
|
||||
* Get a timepoint type for a given study metadata
|
||||
@@ -9,18 +11,18 @@ import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
* @return {String|undefined} Timepoint type if found or undefined if not found or any error/missing information
|
||||
*/
|
||||
const getTimepointType = study => {
|
||||
const timepointApi = Template.instance().timepointApi;
|
||||
const timepointApi = OHIF.viewer.timepointApi;
|
||||
|
||||
if (!timepointApi || !(study instanceof Viewerbase.metadata.StudyMetadata)) {
|
||||
if (!timepointApi || !(study instanceof InstanceMetadata || study instanceof StudySummary) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const timepoint = timepointApi.study(study.getStudyInstanceUID())[0];
|
||||
if (!timepoint) {
|
||||
const timepoint = timepointApi.study(study.getStudyInstanceUID());
|
||||
if (!timepoint || !(timepoint instanceof Array) || timepoint.length < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
return timepoint.timepointType;
|
||||
return timepoint[0].timepointType;
|
||||
};
|
||||
|
||||
Meteor.startup(() => {
|
||||
|
||||
Reference in new issue
Block a user