- Thank you received: 0
Handling of voxelized diffusion tensor imaging data
1 year 11 months ago #4567
by JuliusZ
Handling of voxelized diffusion tensor imaging data was created by JuliusZ
Dear NGSolve team,
We have voxelized diffusion tensor imaging (DTI) data that we want to use in a CoefficientFunction as material properties.
We already used the VoxelCoefficient function to load voxelized MRI data (i.e., only one scalar value per voxel).
However, we could not figure out what the best way is to load tensor data (i.e., one tensor per voxel).
Could you please suggest us a good solution or share your experience?
We thought about loading the tensor component-wise into a VoxelCoefficient and then turning it into a matrix CoefficientFunction.
Thanks for your help and best regards,
Julius
We have voxelized diffusion tensor imaging (DTI) data that we want to use in a CoefficientFunction as material properties.
We already used the VoxelCoefficient function to load voxelized MRI data (i.e., only one scalar value per voxel).
However, we could not figure out what the best way is to load tensor data (i.e., one tensor per voxel).
Could you please suggest us a good solution or share your experience?
We thought about loading the tensor component-wise into a VoxelCoefficient and then turning it into a matrix CoefficientFunction.
Thanks for your help and best regards,
Julius
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
1 year 11 months ago #4568
by christopher
Replied by christopher on topic Handling of voxelized diffusion tensor imaging data
Yes the voxelcf can currently only handle 1 dimensional data. It would not be too hard to extend it to higher dimensional data though, if for example you have always n**2 entries in the values array. Then lookup would have to be done only once resulting in faster evaluation. If you are motivated pull requests are welcome
It would be enough to implement a vector version, you can then reshape the 4 vector in a 2x2 matrix.
It would be enough to implement a vector version, you can then reshape the 4 vector in a 2x2 matrix.
1 year 11 months ago #4569
by JuliusZ
Replied by JuliusZ on topic Handling of voxelized diffusion tensor imaging data
Thanks for the reply
We will have a look into the code and see how to contribute with a PR.
We will have a look into the code and see how to contribute with a PR.
1 year 7 months ago #4742
by JuliusZ
Replied by JuliusZ on topic Handling of voxelized diffusion tensor imaging data
I implemented a possible solution:
github.com/NGSolve/ngsolve/pull/60
Can you please have a look?
Best,
Julius
Can you please have a look?
Best,
Julius
Time to create page: 0.111 seconds