Volume rendering - crop not working in latest nightlies when loading older file

This is on MacOS 10.12.6, MacBook Pro 15 retina (mid 2015), Radeon R9 M370X graphics.

I have a project (MRML, NRRD, segmentation, etc) that I’ve been working with in the April 15 nightly build. I’ve set up volume rendering with cropping and an ROI in a particular spot. I can reload this into the April 15 nightly and everything works great. When I load the same setup into the 5-2 nightly, nothing shows up in the volume render window unless I turn off cropping.

If I make a new annotation ROI and delete the old one, cropping works fine. Any ideas on why it doesn’t like the original ROI?

Thanks!

-Hollister

Hi Hollister,
Thanks for the report! Cropping works fine on Windows, so I’ll try to reproduce it on Mac. Today’s very busy for me, but I’ll try get back to you soon hopefully. In the meantime can you please give me step-by step instructions on how to reproduce it the simplest possible way? Thanks!

I tried on MacOSX 10.13.3 with the latest nightly and cropping works fine without any tricks. Can other Mac users please try to reproduce Hollister’s issue? Thanks

Hi Csaba,

No rush - I’ll get you a repro procedure soon.

Thanks!!

-Hollister

With today’s nightly on a mac pro with AMD FirePro D700 graphics volume rendering and cropping is working fine with me in both CPU and GPU modes. (I download SampleData, enable volume rendering and cropping).

@cpinter, I’m thinking that @hherhold might be reloading a scene file and there’s an issue with the multiple volume update.

1 Like

Yeah, loading a file and volume rendering/cropping/everything in the same version works fine.

The issue is loading a file into a new version that was saved in an older version. New = 5-2 nightly, Old = 4-15 nightly.

If you have an old nightly (4-15) around, do this:

  1. Run old nightly
    2 Load CTACardio
  2. Turn on volume rendering
  3. Turn on cropping
  4. Crop a little
  5. Save
  6. Run new nightly
  7. Load file from old nightly
  8. Observe - no volume rendered.

If you turn off cropping, delete the annotation ROI and start over, it works fine. The issue is just loading old files with a new nightly.

Hope this makes sense!

-Hollister

Yes, it makes complete sense, thanks! I’ll try to look into this soon. I’ll be away for two weeks starting Saturday, so if I can’t get to this tomorrow then it will have to wait a bit, or somebody else will need to try to fix it if it’s urgent.

Not urgent at all.

The workaround is just to delete the old ROI and make a new one - you lose the position of the cropping ROI, but that’s not a big deal.

Thanks!!!

I created a Mantis issue:
https://issues.slicer.org/view.php?id=4547

After some diagnosis:

  1. The error is reproducible as described
  2. If after loading the scene, we load the ROI separately from the acsv file, and select it as ROI for the volume in the Volume rendering module’s input section, then it’s displayed properly
  3. If we clone the node that we loaded with the scene using subject hierarchy’s clone action, and select it as ROI, then the rendering does not show up
  4. The properties of the good and bad nodes are identical

Quite strange. Need to do some debugging to figure this out.

Not sure if it’s related to this: https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/VolumeRendering/MRMLDM/vtkMRMLVolumeRenderingDisplayableManager.cxx#L549-L556

For some reason cropping did not work when I was working on the mult-volume rendering, and after days of debugging I found out that if I invert the normals of the ROI, then it works. It was very strange, as the code that creates the ROI and the normals remained the same. @pieper maybe you have some insight…

It was indeed related to the issue I referenced just above. I found the source of the problem which solved the bug Hollister reported, and removed the need for that workaround I referenced. So I can declare complete victory :slight_smile:

Fixed in https://github.com/Slicer/Slicer/commit/1443b336855a4885fc67e9e4497d3fea25e58e2e

I hope it will work for you too. Now off to vacation!

3 Likes