"Compare Volumes" module - display order

Hi everyone,
I recently discovered the “Compare volumes” module from this post: Link views in three over three configuration - Support - 3D Slicer Community

I find this module great for the rapidity with which it allows me to compare different clinical series (either different modalities acquired at the same time-point or same modalities acquired in different time-points). I have been using Slicer in my daily routine for several years to compare images for both clinical and research reasons, but till a few months ago I had to create layouts manually each time. So thank you very much for developing this module!

I have, however, two issues that I would like to ask your suggestions/help on.

  1. When I want to compare follow-up studies acquired at different time-points, the “Parameters” window does not allow me to select (and therefore view) them in the order most useful to me (for example a chronological order would be ideal). What should I change in the module script to have them listed by volume “name” instead of “MRML ID” (which only depends on the order I imported them in the dataset)? In the latter case, it would be sufficient for me to rename the sequences with the exam date to have them automatically displayed in the proper order.

  2. When there are many studies to be compared (≥6) using the AxiSagCor “Orientation”, the visualization of each study in the same line is no longer optimal (especially while using a “widescreen” resolution).

It would be probably better to have each study arranged in the same column (as in the following screenshot)

Is there a way for me to select/change how studies are displayed (lines or columns)?

I’m really sorry to bother you with these issues but, as a neurosurgeon, my expertise in scripting is quite limited and I have no one here to help me with that :sob: .
I understand that the second issue might require too much effort to be worth spending energy/time on it
if I am the only one experiencing problems with it. However, I hope, at least, that someone could help me with the first one without too much effort.

Thank you very much in advance!

Thanks for the feedback on the module. The data you are working with is exactly why the code was developed in the first place. Other than some odd bug fixes I haven’t worked with this code in a while and I’m not sure when I’d find time, but maybe someone else wants to give it a try?

it may not be documented, but you should be able to drag-and-drop the entries in the Volumes list to control the order they are displayed in the layout. If that’s not enough then probably adding some buttons or a menu to choose sorting orders could make sense.

That’s a good idea. Probably that would be a relatively small change but it would require python coding. The code in question is here.

Another option of course is to get a bigger monitor :eyes:

Many thanks for your reply. I didn’t know it was possible to drag and drop studies! This information is incredibly useful! Thank you very much.

The monitor is already quite big in terms of size and resolution. The main problem is that nowadays they all make them in 16:9 format, so they are much larger than tall :sob:
I understand however that this second issue would take too long to be implemented and probably not be worth it since (I think) I’m one of the very few people comparing such a large number of radiological studies simultaneously.
Thanks again for your support!

Just and idea but if you do this a lot you can rotate the monitor - most operating systems let you work with a rotated display.

It’s probably not a huge amount of work but the layout code is a little tricky so someone would need to figure the magic to make it work as you describe. Let’s see if this feature request gets a lot of votes. It’s very localized logic so this would be a “Good First Project” for someone who wants some programming experience.

3 posts were split to a new topic: Compare Volumes module does not work on Slicer-5.4

Hi there,

I have been using this module a lot in the last months (with different Slicer versions, including the latest updates) since I often need to compare multiple series at the same times and I find it extremely helpful! So thanks again!

Unfortunately, I noticed that in those datasets where I used this module at least once, things start to go extremely slow thereafter: even scrolling a single series in the Red view alone shows extreme “lagging”. The problem persists even if save and close the scene, restart the pc (which is an incredibly powerful workstation with 128 GB DDR RAM and 12th Gen Intel Core i9-12900F, 2400 Mhz, 16 Cores, 24 Logical Processors; Windows 11) and reload the saved scene.

On the contrary, this problem does not occur when I “manually” set the same amount of panels, such as a “4 by 3” or even “7 by 3” scenes, without using the “compare volumes” module.

My impression is that once the “compare volumes” module is utilized to display multiple views, it somehow keeps occupying a huge amount of resources, even if the additional view-panels are not shown anymore. It gets better again if I manually delete all the additional Slice-views created from the “Data”->”All Nodes” module.

Do you think that it represents a problem inside the “compare module” script? Or, conversely, is there a way to auto-release the resources without requiring to manually delete the slices-view, one-by-one, in the “all nodes” windows, when the comparison is not needed anymore?

Thank you very much in advance.


Hi @Michele_Bailo - yes, it sounds like there’s optimization to be done in the script to be sure it is either freeing up resources or re-using them if possible. It would be good to create an issue to track this (in Slicer since this is bundled with the app). A good way to proceed would be to add a new test that iteratively runs various parts of the module’s functionality and measures the performance impact like is done here or here so we can see where what is going on and confirm when it’s resolved. This might be a simple fix.

Thank you very much. I proceeded in opening to issue here:
“Compare volumes” module permanently engulf working memory and processing units once used in a specific Slicer dataset. · Issue #7522 · Slicer/Slicer (github.com)