rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
204 stars 32 forks source link

Add visible x,y,z coordinates in render view #22

Closed msarvestani closed 3 years ago

msarvestani commented 3 years ago

It would be very useful to be able to see live x,y,z coordinates of a mouse click in render view. Thanks!

neurolabusc commented 3 years ago

@msarvestani I have added experimental support for this feature. Do you prefer Windows, Linux or MacOS? I can create a copy for you to try out.

msarvestani commented 3 years ago

windows please. Thanks so much!

neurolabusc commented 3 years ago

@msarvestani please try the experimental release v1.2.20210624.

msarvestani commented 3 years ago

Thanks! Will try and let you know.

hanayik commented 3 years ago

@neurolabusc, Just saw this and downloaded to try out. It's so nice! It would be great to have the cut-out only apply to the 3D render and leave the 2D slices intact. Happy to try and make a pull request if you can point me in the right direction.

neurolabusc commented 3 years ago

This is a consequence of the fact that the cutout is physically removed from the volume and the gradients are re-computed. This helps the user grasp the orientation of the three planes, emphasizing the crease where the planes join.

The alternative would be to have the cutout detected by the shader - this is in fact what we do with the clip plane. My rationale is that the clip plane is a single plane, so there is no crease at the intersection.

You can see the difference when the cutout and clip plane are both shown with a glossy shader (see image below). If we apply the cutout in the shader, the cutout in the glossy image would look like what you see in the matte image.

One could create a rationale for either approach. The appearance is very different, and probably falls to user preference. I do agree that physically removing the cutout from the volume can make the 2D slices look odd. On the other hand, with the new A+C+S+R view, the 2D slices and rendering now correspond to each other when a cutout is not applied.

glossy matte

msarvestani commented 3 years ago

Thanks Chris, this is exactly what I needed. If it's okay I'll share with collaborators.

neurolabusc commented 3 years ago

Sure, the pre-release is available for whoever wants to try it.

Jessy-Ding commented 1 year ago

@msarvestani I have added experimental support for this feature. Do you prefer Windows, Linux or MacOS? I can create a copy for you to try out.

Mac please