-
Notifications
You must be signed in to change notification settings - Fork 599
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
Dicom index order is reversed #1403
Comments
Also, App.getState() is returning different values for position. It was image position patient. And now it looks like number of images - currentIndex. |
v0.31fixed some issues the code was having with non axial data: it uses the proper values of the orientation matrix and sets the origin to the first element of the image position patient array. I though these would compensate each other. Does your image have a specific orientation? Would it be complicated for you to switch indices? You're correct about the state, the position is now the index when it used to be the position. Sorry for that, it should of triggered a version change... Now I am not sure about the future of this state file, I would prefer using something more dicom compatible and am searching for solutions (see #1020). |
@ivmartel - thanks for the response. I don't know if there is a specific orientation. Can you tell me how to check? Changing the index is very easy. And that is what I have currently done. My only concern is, will it always be the same? Or will if be different for different dicom series. And if it will be different, what is the logic to determine that? |
The orientation is given by the 'Image Orientation (Patient)' dicom attribute (
The current code sets the slice with the lowest Image Position Patient ( |
orientation is 1,0,0,0,1,0. i understand how it is being set. that helps. thanks. |
i understand, we can close this. thank you. |
@ivmartel const layerGroup = dwvApp.getActiveLayerGroup();
const viewLayer = layerGroup.getActiveViewLayer();
const viewController = viewLayer.getViewController();
const meta = dwvApp.getMetaData(viewLayer.getDataIndex());
const currentIndex = viewController.getCurrentIndex().getValues();
const instanceNumberValue = meta[`00200013`]; When I open my test file in osirix, and sort by instance number, i get the reversed order that i get with dwv. So how do i get the corresponding instance number? |
the following is meta[00200032].value
|
and below is meta[00200013].value
|
@ivmartel - i reopened this issue because i can't seem to figure out how to correlate instance number with image patient position. if you could please see above. |
You are right, the instance numbers are not sorted and they is no correspondence between the image position patients and the instance numbers. Why are you looking for this correspondence? |
@ivmartel - thanks for the response. i think there should be. in osirix, when i sort by instance number, i get the reverse order form dwv. when i sort by image patient position i get the same order. that would suggest to me, that they are related. |
Sorry, I answered too quickly, the viewer uses the instance number as an index for the meta data when tags are different between instances, so there is a correspondence. But it does not sort the instance number list. Do you need this sort for a specific purpose? |
maybe. is there a way for me to get the instance number for the currently set index? we are using a different parser for meta data. and i need to be able to align those results with the results from dwv. and the way i would generally do that is by instance number. |
Not that I can think of... As a side note, the instance number is not a compulsory DICOM tag. The tag that can be used to uniquely identify a slice is its SOP Instance UID. I use the instance number because the UID can be a long string... And it seems to have worked until now... |
Thanks @ivmartel . That helps. |
I had been using dwv version 0.30.8.
And setting the index as shown below.
Then I upgraded to version 0.31.2, followed by 0.32.0. With both of them, the indices are reversed. When i set the first index, it shows the image for the last index. And when I set the last index, it shows the image for the first. Is there a reason for this? How can I correct it?
The text was updated successfully, but these errors were encountered: