Matthias Ekman wrote:
> Hi,
>
> On Thu, Jul 8, 2010 at 6:26 PM, Moran Artzi <[log in to unmask]> wrote:
>
>> Hi,
>> I have a 2 scripting questions:
>> 1. After checking my results using fslview (as >> fslview image1.nii.gz -l Blue image2.nii.gz -l Cool)
>> How can I save (as a picture) the presented images using the command line?
>>
>
> You might want to have a look at renderhighres
>
and the slicer tool. Maybe pngappend is also worth a look
>
>> 2. When saving a text file for a calculate values
>> as >> fslstats cluster1.nii.gz -V -M -R>>clustersvol.txt
>> >> fslstats cluster2.nii.gz -V -M-R >>clustersvol.txt
>> >> fslstats cluster3.nii.gz -V -M-R >>clustersvol.txt
>> How can I add using the command line (to the output text file) titles differentiates between the calculated values?
>>
>
> like this:
>
>
>> >> echo "cluster2" >> clustersvol.txt ; fslstats cluster2.nii.gz -V -M-R >>clustersvol.txt
>> >> echo "cluster3" >> clustersvol.txt ; fslstats cluster3.nii.gz -V -M-R >>clustersvol.txt
>>
> I understood it here as collumn-titles indicating what is calculatet.
>
So use :
echo "filname voxels volume mean min max"> clustersvol.txt
echo "cluster1" `fslstats cluster1.nii.gz -V -M-R`" >>clustersvol.txt
echo "cluster2" `fslstats cluster2.nii.gz -V -M-R`" >>clustersvol.txt
echo "cluster3" `fslstats cluster3.nii.gz -V -M-R`" >>clustersvol.txt
If you need it more flexible you might be better off with a wrapper
script that reads in a list of nii-files and possible fslstats option,
that creates first a title line for each given option before it loops
through the file list running fslstats.
hope this helps,
wolf
> Bests,
> Matthias
>
>
>
>
>
>
|