help > Save multi-slice as bitmap from cmd
Showing 1-3 of 3 posts
May 25, 2017 12:05 PM | hadas levy
Save multi-slice as bitmap from cmd
Hello,
I'm looking to automatise part of the multi-slice images generation and need the cmd command for saving the multi-slice views that I created.
Is there a command line for "Save as bitmap"?
If not, is there another option to do this using cmd or python?
Thanks,
Hadas
I'm looking to automatise part of the multi-slice images generation and need the cmd command for saving the multi-slice views that I created.
Is there a command line for "Save as bitmap"?
If not, is there another option to do this using cmd or python?
Thanks,
Hadas
Jun 1, 2017 01:06 AM | Chris Rorden
RE: Save multi-slice as bitmap from cmd
You can do this easily with MRIcroGL.
https://www.nitrc.org/plugins/mwiki/inde...
You can see the PDF manual for details, but the relevant calls are MOSAIC and SAVEBMP. Optionally, you can use QUIT if you want MRIcroGL to terminate when it is done executing (I have commented it out below). The sample below shows a mosaic with "L"ables, "A"xial slices, 20% "H"orizontal slices, with two rows: the first row shows MNI coordinates -8, 0, 8, 16 while the second shows slices 24, 32, 40 and 50:
BEGIN
RESETDEFAULTS;
LOADIMAGE('mni152_2009bet');
OVERLAYLOAD('motor');
OVERLAYMINMAX(1, 2.6, 4);
MOSAIC('L + A H -0.100 -8 0 8 16; 24 32 40 50');
SAVEBMP('myimage');
//quit;
END.
https://www.nitrc.org/plugins/mwiki/inde...
You can see the PDF manual for details, but the relevant calls are MOSAIC and SAVEBMP. Optionally, you can use QUIT if you want MRIcroGL to terminate when it is done executing (I have commented it out below). The sample below shows a mosaic with "L"ables, "A"xial slices, 20% "H"orizontal slices, with two rows: the first row shows MNI coordinates -8, 0, 8, 16 while the second shows slices 24, 32, 40 and 50:
BEGIN
RESETDEFAULTS;
LOADIMAGE('mni152_2009bet');
OVERLAYLOAD('motor');
OVERLAYMINMAX(1, 2.6, 4);
MOSAIC('L + A H -0.100 -8 0 8 16; 24 32 40 50');
SAVEBMP('myimage');
//quit;
END.
Jun 1, 2017 12:06 PM | hadas levy
RE: Save multi-slice as bitmap from cmd
This can be a solution, but I prefer doing it with MRIcron, since
we already have a scrip for MRIcron.
Saving the pictures with MRIcroGL means re configuring everything with the new commands.
I was able to do most of the process with MRIcron (using: start /MAX mricron ANATOMY_IMAGE.nii -o FIRST_IMAGE.hdr -h -0.5 -c -7 -o SECOND_IMAGE.hdr -l 0.5 -c -8 -m .\multislice\axMotor.ini) and I'M only missing the "Save as" bitmap step.
Is there a way to save as bitmap with MRIcron script?
Thank you,
Hadas
Saving the pictures with MRIcroGL means re configuring everything with the new commands.
I was able to do most of the process with MRIcron (using: start /MAX mricron ANATOMY_IMAGE.nii -o FIRST_IMAGE.hdr -h -0.5 -c -7 -o SECOND_IMAGE.hdr -l 0.5 -c -8 -m .\multislice\axMotor.ini) and I'M only missing the "Save as" bitmap step.
Is there a way to save as bitmap with MRIcron script?
Thank you,
Hadas