Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Handling of voxelized diffusion tensor imaging data

More
1 year 2 months ago #4567 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
More
1 year 2 months ago #4568 by christopher
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.
More
1 year 2 months ago #4569 by JuliusZ
Thanks for the reply :)
We will have a look into the code and see how to contribute with a PR.
More
10 months 2 weeks ago #4742 by JuliusZ
I implemented a possible solution: github.com/NGSolve/ngsolve/pull/60

Can you please have a look?

Best,
Julius
Time to create page: 0.095 seconds