Segment misalignment

Hi all
Hope you are doing great.
I am working on nasal cavity segmentation. One issue that I have is that the segment doesn’t overlap with the DICOM (picture attached).
A few technical details to mention are that I did crop the volume and used masking.

Untitled

Where is the segmentation coming from? This should not happen if you are running the segmentation in Slicer.

Hi
Thank you very much for your response. Segmentation was created in 3D Slicer.

You’ll need to describe your exact steps that led to this result.

Hi
I used the crop volume to increase the resolution. Then, I used the SimpleLungMask to create a segment.

I don’t recognize that - is it part of an extension?

It belongs to:
Chest Imaging Platform->Toolkit->Segmentation->Generate Simple Lung Mask

That extension may not be fully maintained. You should try running it on the sample data or tutorial data and if the same issue occurs file an issue with the Chest Imaging Platform group. It’s possible that the issue is with some tool that’s not correctly accounting for LPS/RAS coordinates. It would be great if you could help them fix it.

Thank you very much.
I will rerun this with all the steps and share the progress.

Hello. The problem seems to be the coordinates. Using the “Transforms”, it was solved, but the nature of the challenge remains in place.

One error that I receive the moment I open the app, is the “ParticlesDisplay” , the dependency “TractographyDisplay” failed to be loaded. I am not sure how to fix it. I have checked the internet and proxy settings.

Here is the log. I used the sample data.

[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Session start time …: 20240830_111559
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Slicer version …: 5.6.2 (revision 32448 / f10cd8c) win-amd64 - installed release
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Operating system …: Windows / Professional / (Build 22631, Code Page 65001) - 64-bit
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Memory …: 32501 MB physical, 37621 MB virtual
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - CPU …: GenuineIntel , 12 cores, 12 logical processors
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - VTK configuration …: OpenGL2 rendering, TBB threading
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Qt configuration …: version 5.15.2, with SSL, requested OpenGL 3.2 (compatibility profile)
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Internationalization …: disabled, language=
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Developer mode …: disabled
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Application path …: C:/Slicer 5.6.2/bin
[DEBUG][Qt] 30.08.2024 11:15:59 (unknown:0) - Additional module paths …: slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/cli-modules, slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/qt-loadable-modules, slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/qt-scripted-modules
[WARNING][Qt] 30.08.2024 11:16:11 (unknown:0) - When loading module “ParticlesDisplay” , the dependency “TractographyDisplay” failed to be loaded.
[DEBUG][Python] 30.08.2024 11:16:11 [Python] (C:\Slicer 5.6.2\lib\Slicer-5.6\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 30.08.2024 11:16:11 [Python] (C:\Slicer 5.6.2\lib\Slicer-5.6\qt-scripted-modules\SubjectHierarchyPlugins\AbstractScriptedSubjectHierarchyPlugin.py:39) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 30.08.2024 11:16:11 (unknown:0) - Switch to module: “Welcome”
[DEBUG][Qt] 30.08.2024 11:16:57 (unknown:0) - Switch to module: “SampleData”
[DEBUG][Python] 30.08.2024 11:17:05 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Verifying checksum
[DEBUG][Python] 30.08.2024 11:17:05 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - File already exists and checksum is OK - reusing it.
[DEBUG][Python] 30.08.2024 11:17:05 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Requesting load PreDentalSurgery from C:/Users/amanl/AppData/Local/slicer.org/Slicer/cache/SlicerIO/PreDentalSurgery.gipl.gz …
[DEBUG][Qt] 30.08.2024 11:17:06 (unknown:0) - “Volume” Reader has successfully read the file “C:/Users/amanl/AppData/Local/slicer.org/Slicer/cache/SlicerIO/PreDentalSurgery.gipl.gz” “[0.42s]”
[DEBUG][Python] 30.08.2024 11:17:06 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Load finished
[DEBUG][Python] 30.08.2024 11:17:06 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Verifying checksum
[DEBUG][Python] 30.08.2024 11:17:06 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - File already exists and checksum is OK - reusing it.
[DEBUG][Python] 30.08.2024 11:17:06 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Requesting load PostDentalSurgery from C:/Users/amanl/AppData/Local/slicer.org/Slicer/cache/SlicerIO/PostDentalSurgery.gipl.gz …
[DEBUG][Qt] 30.08.2024 11:17:06 (unknown:0) - “Volume” Reader has successfully read the file “C:/Users/amanl/AppData/Local/slicer.org/Slicer/cache/SlicerIO/PostDentalSurgery.gipl.gz” “[0.43s]”
[DEBUG][Python] 30.08.2024 11:17:06 [Python] (C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/qt-scripted-modules/SampleData.py:384) - Load finished
[DEBUG][Qt] 30.08.2024 11:17:10 (unknown:0) - Switch to module: “SegmentEditor”
[DEBUG][Qt] 30.08.2024 11:17:18 (unknown:0) - Switch to module: “CropVolume”
[INFO][VTK] 30.08.2024 11:17:54 [vtkSlicerCLIModuleLogic (0000022AE29C3100)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:870) - Found CommandLine Module, target is C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/cli-modules/ResampleScalarVectorDWIVolume.exe
[INFO][VTK] 30.08.2024 11:17:54 [vtkSlicerCLIModuleLogic (0000022AE29C3100)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:888) - ModuleType: CommandLineModule
[INFO][VTK] 30.08.2024 11:17:54 [vtkSlicerCLIModuleLogic (0000022AE29C3100)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1729) - Resample Scalar/Vector/DWI Volume command line:

C:/Slicer 5.6.2/bin/…/lib/Slicer-5.6/cli-modules/ResampleScalarVectorDWIVolume.exe --hfieldtype h-Field --interpolation nn --transform_order output-to-input --image_center input --spacing 0.0500000000000001,0.0500000000000001,0.0500000000000001 --size 2481,2937,2181 --origin 153.65,146.596,55.7024 --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 C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLScalarVolumeNodeB.nrrd C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLScalarVolumeNodeD.nrrd
[INFO][VTK] 30.08.2024 11:23:05 [vtkSlicerCLIModuleLogic (0000022AE29C3100)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1943) - Resample Scalar/Vector/DWI Volume completed without errors
[DEBUG][Qt] 30.08.2024 11:28:08 (unknown:0) - Switch to module: “GenerateSimpleLungMask”
[INFO][VTK] 30.08.2024 11:28:24 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:870) - Found CommandLine Module, target is C:/Slicer 5.6.2/slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/cli-modules/GenerateSimpleLungMask.exe
[INFO][VTK] 30.08.2024 11:28:24 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:888) - ModuleType: CommandLineModule
[INFO][VTK] 30.08.2024 11:29:21 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1729) - Generate Simple Lung Mask command line:

C:/Slicer 5.6.2/slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/cli-modules/GenerateSimpleLungMask.exe --input C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLScalarVolumeNodeD.nrrd --output C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLSegmentationNodeC.nrrd --lowDose
[INFO][VTK] 30.08.2024 11:30:27 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1917) - Generate Simple Lung Mask standard output:

Reading image…
Median filtering…
[ERROR][VTK] 30.08.2024 11:30:27 [vtkSlicerCLIModuleLogic (0000022AE377AB00): Generate Simple Lung Mask standard error:

2024-08-30 11:30:21.820 ( 58.746s) [ ]vtkGenericDataArray.txx:390 ERR| vtkTypeInt16Array (000002256F06EA90)] (vtkSlicerCLIModuleLogic.cxx:1923) - Unable to allocate 15892286157 elements of size 2 bytes.
[ERROR][VTK] 30.08.2024 11:30:27 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (vtkSlicerCLIModuleLogic.cxx:1996) - Generate Simple Lung Mask terminated with an unknown exception
[INFO][VTK] 30.08.2024 11:34:08 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:870) - Found CommandLine Module, target is C:/Slicer 5.6.2/slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/cli-modules/GenerateSimpleLungMask.exe
[INFO][VTK] 30.08.2024 11:34:08 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:888) - ModuleType: CommandLineModule
[INFO][VTK] 30.08.2024 11:36:01 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1729) - Generate Simple Lung Mask command line:

C:/Slicer 5.6.2/slicer.org/Extensions-32448/Chest_Imaging_Platform/lib/Slicer-5.6/cli-modules/GenerateSimpleLungMask.exe --input C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLScalarVolumeNodeD.nrrd --output C:/Users/amanl/AppData/Local/Temp/Slicer/HDGE_vtkMRMLSegmentationNodeD.nrrd
[INFO][VTK] 30.08.2024 11:37:08 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (D:\D\S\S-0\Base\QTCLI\vtkSlicerCLIModuleLogic.cxx:1917) - Generate Simple Lung Mask standard output:

Reading image…
Lung mask extraction…
[ERROR][VTK] 30.08.2024 11:37:08 [vtkSlicerCLIModuleLogic (0000022AE377AB00): Generate Simple Lung Mask standard error:

2024-08-30 11:37:03.389 ( 62.119s) [ ]vtkGenericDataArray.txx:390 ERR| vtkTypeInt16Array (000001C3525910A0)] (vtkSlicerCLIModuleLogic.cxx:1923) - Unable to allocate 15892286157 elements of size 2 bytes.
[ERROR][VTK] 30.08.2024 11:37:08 [vtkSlicerCLIModuleLogic (0000022AE377AB00)] (vtkSlicerCLIModuleLogic.cxx:1996) - Generate Simple Lung Mask terminated with an unknown exception

Again, it’s very likely that the Chest Imaging Platform needs maintenance and you shouldn’t expect to be able to use it without investing time to understand and fix it.

If the issue is the missing Tractography Display module you can try installing the SlicerDMRI extension and that may help.