[Camino-users] error when splitting tensor components with shredder
Philip A Cook
cookpa at mail.med.upenn.edu
Thu Jan 23 08:57:24 PST 2014
Perhaps the problem has to do with the ordering of the components. NIFTI tensors should be lower triangular (dxx, dxy, dyy, dxz, dyz, dzz).
A simpler solution would be to use voxel2image:
voxel2image -inputfile dti.Bdouble -header image.nii.gz -components 8 -outputroot dt_component_
where image.nii.gz is an image with the correct header information (such as the raw DWI data).
The above gives you the components. If you want the tensor in NIFTI symmatrix format, you can use dt2nii.
On Jan 23, 2014, at 10:28 AM, Alessandro Calamuneri <alecalamuneri at gmail.com> wrote:
> Hi all,
> I would like to obtain tensor components computed with using modelfit and nldt_pos as algorithm. Everything seems to work properly, as I can also correctly visualize results using e.g. pdview.
> But when I want to split this file to obtain single components I eot stuck: here is my code
>
> for ((i=0;i<8;i=i+1));do
> #splitting tensor into its components
> shredder $((i*8)) 8 56 < dti.Bdouble > DT_comp${i}.img
> #creating proper header
> analyzeheader -voxeldims 1.75 1.75 2 -datadims 128 128 74 -datatype double > DT_comp${i}.hdr
> done
>
> If I have correclty understood,my output should be
>
> DT_comp0.img which contains exitcode
> DT_comp1.img which contains log of unweighted signal
> DT_comp2.img which is DT_xx
> DT_comp3.img which is DT_xy
> DT_comp4.img which is DT_xz
> DT_comp5.img which is DT_yy
> DT_comp6.img which is DT_yz
> DT_comp7.img which is DT_zz
>
> Now, to check if my assumptions are correct I go back to tensor by means of nii2dt function (before doing that I merge volumes using fslmerge)
>
> fslmerge -t tensor DT_xx.nii DT_xy.nii DT_xz.nii DT_yy.nii DT_yz.nii DT_zz.nii
>
> so
>
> nii2dt -inputfile tensor.nii.gz > dt.Bdouble
>
> eventually I calculate fa
>
> cat dt.Bdouble | fa | voxel2image -outputroot my_fa -header tensor.nii.gz
>
> But when I look at the results fa map is totally wrong as the fa values are in the range [.9 1.2], which is impossible of course.
>
> I also tried using linear option and addingo lns0 and mask (inverting endianness as described for mask output of bet2 function) as well .In this last case the code was
>
> nii2dt -inputfile tensore.nii.gz -bgmask mask.img -lns0 DT_comp1.img > dt.Bdouble
>
> but with no amelioration at all.
>
> Where am I wrong? Is the position of tensor components wrong?
> Is the reconstruction back to camino tensor wrong?
> Is shredder badly used?
> Is it a problem of mask endianness?
>
>
> Hope you can help me,
>
> Best,
> Alessandro
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users
More information about the Camino-users
mailing list