-
Notifications
You must be signed in to change notification settings - Fork 326
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
VolumeViewport Orientation when ImageOrientation metadata is unusual #160
Comments
In that case, what should one do to achieve the proper oblique orientation? |
OHIF is using the same Cornerstone3D engine, you can try drag and dropping here. So is the problem you are having the camera orientation or the left and right? I'm confused |
Well in the end my problem for this example is the left and right, but I believe it's caused by the orientation. With different Dicoms I'm having different camera problems(other than left=right), so I'm not looking only for a 'left=right' solution, but generally for a 'how should the volume/viewport be prepared so that I can view the Dicoms how other viewers do it'. I've earlier tried the DICOMs with the cornerstone uploader you linked, but it renders a stack instead of a volume, and in that case the problem doesn't appear. I suppose that could be a thing to investigate |
Hmmm, so our volume camera is different than our stack camera, which is interesting to know. Just before I look deeper into this, can you check other dataset you have (not just this Knee MRI), to see if that is persistent bug?
I guess if there is a bug, then we need to fix it, but generally you need to get the camera from the viewport |
Are there any updates on this matter? |
Hey, I was thinking have you tried setting the orthogonal viewup and slice normal similar to this? The volumeViewport support any arbitrary orientation |
@LittleURF @sedghi im struggling to get a series of dicomp10 files rendered as a volume . im very new to cornerstonejs and i couldnt get much help . this is the code ive written so far . im able to locally load files and get 1 slice rendered in 3d but cant load whol image . A little help will be higly appreacited thanks import { cornerstoneDICOMImageLoader.external.dicomParser = dicomParser; const { ViewportType } = Enums; // Define a unique id for the volume // ======== Set up page ======== // let change = false; viewportGrid.style.display = 'flex'; const element1 = document.createElement('div'); element1.style.width = size; viewportGrid.appendChild(element1); const instructions = document.createElement('p'); addButtonToToolbar({ addDropdownToToolbar({
}, let viewport; /**
const toolGroupId = 'TOOL_GROUP_ID'; addManipulationBindings(toolGroup, { if (!change) { renderingEngine = new RenderingEngine(renderingEngineId); const viewportInputArray = [ renderingEngine.setViewports(viewportInputArray);
} |
TLDR:
How to set proper orientation for a VolumeViewport when ImageOrientationPatient metadata doesn't match the provided constant orientations?
---
Hi,
I'm having issues with finding out the proper Orientation values to set, when I'm rendering a volume with ImageOrientation metadata values different than the usual Axial/Sagital/Coronal values.
I believe that the ImageOrientation values map to orientations like this:
But when the ImageOrientation value is different(like below), the standard orientations don't result in the expected Axial/Coronal/Sagital views.
[0.85005025920695,-0.5267015823236,2.1648092e-8,0.00883004239504,0.01425087456269,-0.9998594615872]
.I think cornerstone doesn't have any instructions about what to do in such case.
So I attempted to create a custom orientation based on the ImageOrientation, I found out that the
sliceNormal
part is created by crossing the ImageOrientation like this:sliceNormal = cross(imageOrientation.slice(0, 3), imageOrientation.slice(3, 6))
, though I'm not sure if it's correct. And for the ViewUp part I have no idea how I should set it properly...When using the calculated SliceNormal and some viewUp from the constant orientations, the view seems like it's correct, except for the camera. It's often positioned wrongly. For example, for these views to be correct, we'd need to: flip the camera horizontally / move the camera to the back of the image instead of the front etc. Cornerstone doesn't give us functionalites like that tho, and even if it did, it'd be hard to dynamically decide what camera operations need to be done to make the specific view correct.
So my question is, how to set the orientation for volumes with custom ImageOrientationPatient metadata?
Volume rendered with Orientation Coronal
Volume rendered with Orientation Axial
Volume rendered with custom orientation -
sliceNormal = cross(imageOrientation.slice(0, 3)
,viewUp = [0, 0, 1]
(in this case the problem is left=right)
Used DICOM files - series-000001.zip
The text was updated successfully, but these errors were encountered: