How to generate a color coded vector field
Mostrar comentarios más antiguos
Hello everyone,
I am working on Diffusion Tensor Imaging and I am trying to generate a color coded FA map. I have generated the diffusion tensor matrix and extracted the eigenvalues and eigenvectors for each voxel of a 256 x 256 image. For each voxel i have an intensity (between 0 and 1) and a 3x1 array representing its direction in space.
My question is how can I color code each voxel, acording to the direction of the main eigenvector? For example, let's say that if the vector has a direction of x axis (1,0,0) the color of the voxel would be red; y axis (0,1,0) green; and z axis (0,0,1) blue. And if the vector has a direction in between two axis (example x an y) the color of the voxel would be a mix of red and green, weightned accordingly if it is closer to x or y axis. Example: http://imagebank.osa.org/getImage.xqy?img=LmxhcmdlLG9lLTIzLTEyLTE1MTM0LWcwMDg The color of each voxel would be a color on the surface of the sphere, according to the direction of the vector corresponding to that voxel (the origin of the vector is in the center).
I know there are other sofware (e.g. FSL) that compute color coded FA maps but I am designing a matlab code from scratch for a project and haven't figured out how to generate it.
Any help would be appreciated! Thanks
1 comentario
pina ricciuti
el 3 de Jun. de 2018
Hi Bruno, I have the same problem. How did you solve it in matlab?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre White en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!