Orthogonal and Oblique MPR Slicing and Fusion

Is only a single slice loaded? Do you see image in the other views if you click the “Reset field of view” button (rectangle button next to the slice slider)?

Yes, only one slice. Nothing in the other panes. The folder contains 2,271 images.

Correction to the command:

, I did specify a single file in that command, not just a folder. So the correction is here…

“C:\ProgramData\NA-MIC\Slicer 4.11.20200930\Slicer.exe” --no-splash --python-code “setToolbarsVisible(False); setMenuBarsVisible(False); slicer.app.processEvents(); mainWindow().findChildren(‘QDockWidget’,‘PanelDockWidget’)[0].hide(); slicer.app.processEvents(); loadVolume(r’H:\VTKTest\Images4VTK\CTChestThinSlice\Slice_1.dcm’)”

Does the folder contain multiple series? If yes, then it is better to index the folder and load using DICOM module.

An example for loading all series from a folder is available here: https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_load_DICOM_files_into_the_scene_from_a_folder

Performance can be improved if you have an idea what kind of data set you want to load (by default all possible interpretations of an image set will be evaluated and the best fit will be loaded, but going through all these interpretations take some time).

No, it’s just one thin slice CT series and I’m specifying only 1 frame of that single frame series. It is rather huge. Maybe I should try a smaller series. But it should handle large series.

Andras, I just viewed the document in the link you sent. Thanks. I’ll study that for a bit. :slight_smile:

A question about oblique slicing: Is there a way to show orientation labels on each of the 3 orthogonal views as we rotate the slice cursors?

That’s not a slicer question, it’s a VTK programming question. Thanks.

YES! THIS WORKED!

Slicer.exe --python-code “slicer.util.loadVolume(‘C:/DICOMImages//CTSlice.dcm’, {‘singleFile’: False})”

singleFIle=false

1 Like

You can enable orientation marker in views using slice/3D view controllers or using this code snippet: Documentation/Nightly/ScriptRepository - Slicer Wiki

Thanks @lassoan.

Hey @lassoan, are you familiar with the code that was used to generate the QtVTKRenderWindows? A guy named Sankhesh Jhaveri developed it. do you know him?

Thanks

Yes, we collaborate with Sankhesh and other Kitware engineers on QVTKOpenGLNativeWidget/QVTKOpenGLWidget/QVTKWidget to have VTK rendering working in Slicer and ParaView. Right now, he is working on bugs in VTK9 that we discovered when trying to upgrade Slicer to use VTK9.

Great! I’m happy to know that you’re working on bugs in VTK9 and that he is still involved. Thanks!

@lassoan Does slicer have a Fusion UI?

Yes. In slice views you can fuse two volumes, a labelmap volume, and any number of segmentation, models, and markup layers. In 3D views, you can superimpose any kind and number of data objects.

@lassoan is the code written in such a way that I can extract the fusion function from Slicer to make a stand alone app?

The blending pipeline is implemented here: https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Logic/vtkMRMLSliceLogic.cxx

What was the reason not to go with Slicer? Large install package? Startup time?

@lassoan - I think I just don’t know how to do it. I tried different things and can’t get it to work. Would you be patient enough to see me through to getting it to work? I know you’re really busy.

@lassoan ow thanks for that code. Looks interesting. So, I’m assuming the I would write all of the GUI and when ready to blend between volumes or images, I would call this function to create the output blended image. Correct?

@lassoan I appeared before the Mayo Applications committee yesterday and proposed my QREADS 3D MPR and Fusion expansion or plugin ideas to them. One of their big requests was to have the UI look and feel match that of our QREADS application as much as possible. This may be another reason to try isolating the code to create a stand alone app that I can have full control of the look and feel as well as loading faster than a full Splicer would. It would also need to read DICOM files directly from disk.

@spycolyf - if the QTREADS 3D UI is probably feasible to implement in Qt. Then you could just use the Slicer logic classes underneath.