[Camino-users] sfplot warning/error
Seunarine, Kiran
k.seunarine at ucl.ac.uk
Tue Aug 14 08:37:44 PDT 2012
Hi Zhuang,
Sorry for the slow reply. With regard to your first question, what command did you use to create the FA map? The standard command, i.e.
fa < dwi.Bfloat > fa.img
should output the FA as big-endian doubles. If you used a different command (for example, you set -outputdatatype or piped the output through voxel2image) then the you have to adjust the data type in the subsequent commands. I will add the DTI commands we used to the multi-fibre tutorial to avoid any further confusion.
To create different views in sfplot, you will need to use Camino's shredder utility to extract the correct information. So, to obtain a coronal view, the commands are
# coronal image (slice 61) - read 11th row of each axial slice
sliceOffset=60
shredder $((sliceOffset*112*4)) $((1*112*4)) $((111*112*4)) < fa.img > cor_fa.Bfloat
shredder $((sliceOffset*112*(246+2)*8)) $((1*112*(246+2)*8)) $((111*112*(246+2)*8)) < dwi_ODFs.Bdouble > cor_dwi_ODFs.Bdouble
The shredder command above skips the first 60 rows, reads a row, then skips the next 111 rows. This gives you one coronal slice. You can select other slices by adjusting the initial offset.
# plot as usual, but remember to update -projection so that the ODFs are being viewed from the correct direction!
sfplot -inputmodel rbf -rbfpointset 246 -rbfsigma 0.2618 -xsize 50 -ysize 112 -minifigsize 30 30 -minifigseparation 2 2 -minmaxnorm -dircolcode -projection 3 -2 -backdrop cor_fa.Bfloat < cor_dwi_ODFs.Bdouble > cor_dwi_ODFs.rgb
convert -depth 8 -size 3584x1600 cor_dwi_ODFs.rgb cor_dwi_ODFs.png
The procedure is the same for the sagittal view:
# sagittal image (slice 61) - read 61st element of each axial row of data
sliceOffset=60
shredder $((sliceOffset*4)) $((1*4)) $((111*4)) < fa.img > sag_fa.Bfloat
shredder $((sliceOffset*(246+2)*8)) $((1*(246+2)*8)) $((111*(246+2)*8)) < dwi_ODFs.Bdouble > sag_dwi_ODFs.Bdouble
The shredder command for the sagittal view follows the same principle. First, you skip a given number of voxels in a row. You then read a single voxel and then skip another 111 voxels (in this example there are 112 voxels in a row). As before, the command gives you the data for a single slice of the volume and the offset controls the slice.
# again, remember to update -projection so that the ODFs are being viewed from the correct direction!
sfplot -inputmodel rbf -rbfpointset 246 -rbfsigma 0.2618 -xsize 50 -ysize 112 -minifigsize 30 30 -minifigseparation 2 2 -minmaxnorm -dircolcode -projection 3 -1 -backdrop sag_fa.Bfloat < sag_dwi_ODFs.Bdouble > sag_dwi_ODFs.rgb
convert -depth 8 -size 3584x1600 sag_dwi_ODFs.rgb sag_dwi_ODFs.png
Hope that helps.
Kiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/camino-users/attachments/20120814/42582b3a/attachment.html
More information about the Camino-users
mailing list