Closed LalithShiyam closed 11 months ago
@Keyn34 Kindly have a look at this. I think it's a reasonable way to provide users with some flexibility and don't take these codes as cut in stone.
I like the idea of implementing this as a "post-processing" step instead of bending the regular workflow of pumaz to respect assignments. This design makes our lives and the lives of users significantly easier.
I would also propose to make the names of the generated aligned images easier to understand. For example, the name could become something like {tracer}_{channel}{colour}.nii.gz
. This would also help users to understand the assignments better.
I will work on the implementation.
I would also propose to make the names of the generated aligned images easier to understand. For example, the name could become something like {tracer}{channel}{colour}.nii.gz. This would also help users to understand the assignments better._
The aligned names are generated from the folder name and I am not sure if we can get the tracer name without dicom and I am not a fan of making the folder structure naming rigid (after our lessons from moose). I would let the users decide on the color channel they prefer by asking them what they want from Rgb. We are just deriving a multiplexed image and not providing the individual rgb label anyway.
Regarding the postprocessing, sure - as long as the user can use puma as a CLI tool or a library. Either we can pass the directory with the aligned images and trigger an interactive terminal session or create an input argument with -- custom_colors tracer_01.nii.gz:red tracer_02.nii.gz:green tracer_03.nii.gz:blue
But I would prefer to wrap this up by next week. Let's reconvene during the mid of next week to discuss progress, if there is a hiccup, let's sort it out so that we meet the deadlines.
Fair point. We can't get tracer association when we don't have the dicom. And even if the dicom does exist, it might not be clear by tags.
As far as I understood it, we now have two options:
--custom_colors
, followed by the <aligned_by_puma.nii.gz>:<colour>
dictionary again (like your original post).The user runs puma with --custom_colors
and is prompted during multiplexing which image receives which colour channel (like your second comment).
Either way we do it, the implementation is similar. I will prepare the functions, and we take it from there on Wednesday.
Summary
I propose the addition of a feature in the PUMAZ tool that enables users to manually assign specific color channels (Red, Green, or Blue) to PET tracer images during the multiplexing process. This feature, which is optional and activated via a command line argument, should bypass the alignment step when used.
Detailed Explanation
In the current version of PUMAZ, color channels for tracer images are assigned automatically during the multiplexing process. However, in certain cases, the automatic assignments may not satisfy specific analytical requirements. To improve this, I recommend a feature that allows users to select a color channel (R, G, or B) for each tracer, thus offering enhanced control and flexibility in image visualization.
Key Features:
--custom-colors
) to enable custom color channel assignment.image_processing.py
to use these user-assigned color channels.Use Case
This feature is crucial for instances where default color assignments do not provide clear or meaningful visual distinctions, allowing for tailored visualizations essential for enhanced interpretation and analysis of PET images.
Implementation Suggestion
multiplex
function inimage_processing.py
to support color channel assignments.pumaz.py
to collect user-defined color channel assignments.pumaz.py
) to selectively execute alignment and multiplexing based on the--custom-colors
argument.Impact
This enhancement will significantly increase the usability of PUMAZ in medical image analysis, particularly in customizing the visualization of PET images for improved clarity and interpretability.
Proposed Code Modifications
Addition in
pumaz.py
(Main Script)Function for Obtaining Custom Color Channel Assignments in
pumaz.py
Modifications in
image_processing.py
_New Function for Custom Color Channel Blending in
image_processing.py
_