Hi Venkateswaran, I think the command that you listed is indeed saving the
eigenvectors. There are three eigenvectors and each has 3 components, hence
3x3 information at each voxel. They should be ordered with the principal
eigenvector first, so just index your array at 0 in that dimension to get
only the principal eigenvector. e.g. if your array is shape (H,W,D,3,3)
then i believe you'd index with [:,:,:,0,:]

Ebrahim

On Mon, Sep 23, 2024 at 12:22 PM Venkateswaran Rajagopalan <
[email protected]> wrote:

> Dear All
>
> I am new to DIPY. I am using dipy's tensor fit command used by Marc Golub
> in his  free water estimation using Beltrami fit code (as I have only six
> directional clinical scans).
> I would like to save the eigen vector files in nifti format which I would
> like to use for tractography using another software especially eigen vector
> 1.
>
> I followed the documentation given in webpage
> https://workshop.dipy.org/documentation/1.6.0./examples_built/reconst_dti/
> and used the command
>
> save_nifti('tensor_evecs.nii.gz', tenfit.evecs.astype(np.float32), affine)
>
> but it looks like the above command saves the Diffusion tensor matrix Dxx,
> Dxy etc and is of 3*3
>
> How to get only the eigenvector 1, 2 and 3 separately and save them
> separately
>
> I spent quite some time searching the DIPY documentation and  email
> archives but was not able to find it. Can some in the email list kindly
> help me with the command to save the eigenvector 1 as a nifti file
>
> Thanks
> Venkat
> _______________________________________________
> DIPY mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/dipy.python.org/
> Member address: [email protected]
>
_______________________________________________
DIPY mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/dipy.python.org/
Member address: [email protected]

Reply via email to