Page 1 of 1

PET Maximum/Sum Intensity Projection

Posted: Sat Dec 06, 2014 7:56 pm
by rvboutin
Hi,
I am trying to create a PET Maximum/Sum Intensity Projection file in Brainvisa 4.1.1 (I have the preclinical PET segmentation module in this version that I cannot transfer to another version), and I am pretty sure I was able to make PET Maximum/Sum Intensity Projection file before with the module of the same name. I does not work anymore, I got different type of errors:

Code: Select all

Cannot start command 'AimsMaxAndSumProjection' '-i' '/tmp/bv_2024366.ima' '-s' '/tmp/bv_2024364.ima' '-m' '/tmp/bv_2024365.ima' '-p' 'a' : No such file or directory Try to restart the command... Cannot start command 'AimsMaxAndSumProjection' '-i' '/tmp/bv_2024366.ima' '-s' '/tmp/bv_2024364.ima' '-m' '/tmp/bv_2024365.ima' '-p' 'a' : No such file or directory Try to restart the command... Cannot start command 'AimsMaxAndSumProjection' '-i' '/tmp/bv_2024366.ima' '-s' '/tmp/bv_2024364.ima' '-m' '/tmp/bv_2024365.ima' '-p' 'a' : No such file or directory in PET Maximum/Sum Intensity Projection 2 Cannot start command 'AimsMaxAndSumProjection' '-i' '/tmp/bv_2024366.ima' '-s' '/tmp/bv_2024364.ima' '-m' '/tmp/bv_2024365.ima' '-p' 'a' : No such file or directory 
RuntimeError
neuroProcesses.py (2491) in _processExecution: 
result = process.execution( self )
PETMaxAndSumProjection.py (176) in execution: 
?
neuroProcessesGUI.py (1520) in system: 
?
neuroProcesses.py (2612) in system: 
ret = self._system( command, self._systemStdout, self._systemStderr )
neuroProcesses.py (2707) in _system: 
raise e
or

Code: Select all

36 projections are equivalent to 10 degree rotations Flip axes according to YZ Flip PET volume according to XXYY 
in PET Maximum/Sum Intensity Projection 1 global name 'dimInput' is not defined 
NameError
neuroProcesses.py (2491) in _processExecution: 
result = process.execution( self )
PETMaxAndSumProjection.py (117) in execution: 
?
or an invalid format error on my input file (.v ECAT format), and the process strangely overwrite that input file!
I have checked in the brainvisa/bin folder, and the "AimsMaxAndSumProjection" is not in the folder, I also tried Brainvisa 4.3.0 and Brainvisa 4.4.0, with the same problem and the "AimsMaxAndSumProjection" is in those version either.
So basically, how can I create a PET Maximum/Sum Intensity Projection image?
Thanks,
Rv

Re: PET Maximum/Sum Intensity Projection

Posted: Sun Dec 07, 2014 5:08 pm
by riviere
Hi,

The AimsMaxAndSumProjection command appears to be part of the old nuclear imaging toolbox, which has been unmaintained by their authors for several years, and caused problems. So we had to remove it from public releases. I don't even know what this command used to do exactly...

Denis

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 12:58 am
by rvboutin
Hi Denis,
OK I see, I noticed that the nuclear imaging tool box had disappeared. That's a shame there were very useful tools for preclinical imaging in there.
The "PET Maximum/Sum Intensity Projection" tool was as its name indicated used to obtain an maximum and sum intensity projection image in one of the 3 possible axis. Is there another tool in the new versions that can do that?
Cheers,
Rv

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 1:19 pm
by rvboutin
Hi Denis,
Any hope that you could get the nuclear imaging toolbox or the PET Maximum/Sum Intensity Projection binary and upload it somewhere for me?
Cheers,
Rv

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 2:34 pm
by riviere
Hi,
I know it is not really satisfactory to stop releasing a toolbox, but it was not maintained, and we could not perform its maintenance since we are not a lot of maintainers here (see, I think I'm the last one still answering the forum from time to time), and moreover don't have the knowledge of this specific toolbox. That's life: some toolboxes die, other are born...
Anyway if the command only did max or sum on one of the axes, it is possible to do the same by programming a little bit of python/pyaims/numpy, in just one line.

Code: Select all

from soma import aims
import numpy
vol = aims.read('data_volume.nii')
# sum along Z axis
sum_proj_z = numpy.sum(numpy.asarray(vol), axis=2)
# or max along X axis
max_proj_x = numpy.max(numpy.asarray(vol), axis=0)
# and if you want to save the result as a new 2D image
sum_proj_z_vol = aims.Volume(sum_proj_z)
sum_proj_z_vol.header()['voxel_size'] = vol.header()['voxel_size']
aims.write(sum_proj_z_vol, 'sum_proj_z_vol.nii')
Note also that there are some MIP rendering tools in Anatomist (in the volume rendering object options).

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 4:18 pm
by rvboutin
Hi Denis,
Thanks for your reply. The MIP tool in Anatomist might do what I need, but where are the volume rendering object options in Anatomist? I can't find them?
Thanks,
Rv

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 4:26 pm
by rvboutin
Hi Denis,
OK no worries, I found that the command line "EcatVolMIProj" does just what I want so I am fine.
Thanks again for your help.
Rv

Re: PET Maximum/Sum Intensity Projection

Posted: Tue Dec 09, 2014 5:56 pm
by riviere
To use volume rendering / MIP / sum projection in Anatomist:

In anatomist, select the volume (just it), and click on the fusion button (or menu). Make a volume rendering fusion. The new objects can be viewed in a 3D window.
Then select the volume rendering object in Anatomist main window, and use its right-click menu: select "fusion/volume rendering properties". It will open a parameters window for the volume rendering object.
There you can switch to MIP or sum mode.
You will have to set the window background to black because MIP and sum is processed via OpenGL in the RGB color space (in the window menu: scene/light, then go to the model tab, and change the background to black).
You will also certainly have to change the colormap bounds to see anything useful, setting the max far higher than the actual maximum of the image to avoid saturation while summing (typically for a volume which values are in 0-1000, you will have to set the max around 20000 or 30000).

Denis