Segment and Volume Rendering views get misaligned upon re-Crop input volume

Hello,

The pictures below show that a segment gets displaced, or does not follow a re-cropped volume.

To reproduce :
Crop a volume (CTA-Cardio here)
Paint anything with a big sphere brush in Segment Editor and show its 3D representation
Go to Volume Rendering and apply any filter
Go back to Crop Volume, modify the bounds (enlarge here), and apply while keeping the same output node name
In the 3D view, the 3D Volume Rendering view and the segment are no longer aligned

0
1
2

Is it a feature or does it need a fix ?

Regards.

It’s related to LR alignment of the 3D view that is detached from the ROI coordinates. Segment representation is an artifact in the description, that showed the problem initially.

This screen recording illustrates the problem.

Thanks for the investigation and the video! It seems that the problem is neither in Segment Editor / Segmentation, nor Crop Volume, but in Volume Rendering. Is there anything you can do to fix this misalignment issue? Like Enable/Disable cropping, change preset or the transfer function… it might give us a clue where the bug is. Also is there any suspicious error in the log?

The 3D Volume Rendering view remains unaligned for whatever value of

  • Preset (transfer function I suppose)
  • Crop or Display ROI (in Volume Rendering widget)
  • CPU or GPU rendering
  • Memory size
  • Quality
  • Technique (Composite with shading, Maximim/Minimum intensity)
  • Surface smoothing
  • Synchronize with volume module
  • ‘Closing/Opening’ the eye icon

The 3D view gets aligned back correctly if one of these is changed :

  • Memory size
  • Quality
  • Technique (Composite with shading, Maximim/Minimum intensity)
  • Surface smoothing

Here is a sample console output :

Switch to module: “Volumes”
Assertion this->Table->columnWidth(j) == newWidth failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 242
Assertion this->Table->columnWidth(j) == newWidth failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 242
Assertion this->Table->columnWidth(j) == newWidth failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 242
Assertion this->Table->columnWidth(j) == newWidth failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 242
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
QObject::connect: No such signal ctkDoubleSpinBox::valueChanged(int)
QObject::connect: (sender name: ‘NumberOfScalarsSpinBox’)
QObject::connect: (receiver name: ‘qMRMLVolumeInfoWidget’)
Assertion this->Table->rowHeight(i) == newHeight failed in /work/Preview/Slicer-0-build/CTK/Libs/Widgets/ctkMatrixWidget.cpp line 253
Loading Slicer RC file [/home/user/.slicerrc.py]
Loaded volume from file: /home/user/Desktop/BIG/Slicer/CTA-cardio.nrrd. Dimensions: 512x512x321. Number of components: 1. Pixel type: short.

“Volume” Reader has successfully read the file “/home/user/Desktop/BIG/Slicer/CTA-cardio.nrrd” “[1.17s]”
Switch to module: “CropVolume”
void qSlicerCropVolumeModuleWidget::setInputROI(vtkMRMLNode*) : invalid parameter node
Found SharedObject Module
ModuleType: SharedObjectModule
Resample Scalar/Vector/DWI Volume command line:

slicer:0x7f5ede5e6d00 --processinformationaddress 0x8d5bd08 --hfieldtype h-Field --interpolation linear --transform_order output-to-input --image_center input --spacing 0.933594,0.933594,1.25 --size 24,49,63 --origin 55.3847,70.2063,-66.9684 --direction_matrix -1,0,0,0,-1,0,0,0,1 --number_of_thread 0 --default_pixel_value 0 --window_function c --spline_order 3 --transform_matrix 1,0,0,0,1,0,0,0,1,0,0,0 --transform a slicer:0x1c758e0#vtkMRMLScalarVolumeNode1 slicer:0x1c758e0#vtkMRMLScalarVolumeNode2

Switch to module: “VolumeRendering”
Switch to module: “CropVolume”
Found SharedObject Module
ModuleType: SharedObjectModule
Resample Scalar/Vector/DWI Volume command line:

slicer:0x7f5ede5e6d00 --processinformationaddress 0x815acc8 --hfieldtype h-Field --interpolation linear --transform_order output-to-input --image_center input --spacing 0.933594,0.933594,1.25 --size 51,49,63 --origin 80.6069,70.2063,-66.9684 --direction_matrix -1,0,0,0,-1,0,0,0,1 --number_of_thread 0 --default_pixel_value 0 --window_function c --spline_order 3 --transform_matrix 1,0,0,0,1,0,0,0,1,0,0,0 --transform a slicer:0x1c758e0#vtkMRMLScalarVolumeNode1 slicer:0x1c758e0#vtkMRMLScalarVolumeNode2

Switch to module: “VolumeRendering”

I may give more information as per your instructions.

Regards.

This was very useful, thank you, we could reproduce and fix the error (r28493).

1 Like