Closed helghast79 closed 11 months ago
This error happens when you try to load two slices that have the same image position patient (origin). This can happen when you load data from different series. (I changed the error to be more explicit, this will be available in v0.33)
in this case, 8 instances from the same series but the ImagePositionPatient repeats itself in several instances. What should be the best way to deal with this so that we can display the series?
ImagePositionPatient: -77.171976602889\-51.887350914084\-231.77389001594, InstanceNumber: 1
ImagePositionPatient: -77.171976602889\-51.887350914084\-231.77389001594, InstanceNumber: 10
ImagePositionPatient: -78.070925272323\-51.862707969748\-219.80764245735, InstanceNumber: 100
ImagePositionPatient: -78.295662439681\-51.856551048361\-216.81609582649, InstanceNumber: 101
ImagePositionPatient: -78.295662439681\-51.856551048361\-216.81609582649, InstanceNumber: 102
ImagePositionPatient: -78.295662439681\-51.856551048361\-216.81609582649, InstanceNumber: 103
ImagePositionPatient: -78.295662439681\-51.856551048361\-216.81609582649, InstanceNumber: 104
ImagePositionPatient: -78.295662439681\-51.856551048361\-216.81609582649, InstanceNumber: 105
It is probable that you are mixing series, check the SeriesInstanceUID
to be sure to just load one series at a time.
There is a dwv cli tool (dwvcli) that allows to sort files according to their SeriesInstanceUID
.
The app I'm developing creates an array containing imageIds for the viewer. Each element of the imageIds corresponds to a specific instance within a series and is retrieved from an Orthanc PACS using its native API, which functions similarly to DICOM-Web. When the app requests the series, it receives a JSON object containing metadata and a list of instances (their exact IDs). Therefore, I can confirm that all instances sent to the viewer originate from the same series, study, and patient. I also double-checked, and all of them share the same SeriesInstanceUID
.
Ok. Can you share the data?
Sure, where do I send it?
My email is on my profile.
Hi, the data you sent me has multiple time points. It contains data at the same physical position but at different times which is why you get the error.
In order to handle it, you have to tell the viewer which DICOM tag to use to separate the time points. See this example code: pacs/viewer.js#L45. The Temporal Position Identifier attribute (0020,0100) could be a solution.
Thanks, the temporal position identifier (0020,0100) can be used in these cases to separate the slices. I have changed the getTime function to
Dwv.TagValueExtractor.prototype.getTime = (elements) =>{
let value;
const time = elements['00200100']
if (typeof time !== 'undefined') {
value = parseInt(time.value[0], 10)
}
return value
}
and now it works perfectly!
Be aware that the time tag can vary for different type of acquisitions, there does not seem to be a consensus on a common time tag... at least not that I know...
Vendors sometimes store theses values in other tags but must be on some edge cases. Temporal Position Identifier (0020, 0100) should be used in dynamic imaging series or time-series data. When not present, I'll just assume they are not time dependent or just use the instance number as fallback.
In the dataset I have at the moment all series return a Temporal Position Identifier of 1 for non time-dependent and other values for time-dependent series with the exception of multiframes, they seem to miss that tag entirely. Unfortunately I have no time-dependent multiframe series to check where is that info being kept, maybe inside some shared functional group sequence, Temporal Position Index (0020,9128) might be one of them
One possible way to deal with this is to check for position patient inconsistencies and then, if true, try to get the Temporal Position Identifier and fallback to instance number
Some series display "Zero slice spacing" error. The first item is rendered but scrolling will trigger same error. The console error print:
Metadata got from loaditem event listener is listed below. Other viewers display the series without problem. What can be causing this?