Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to convert a tracks file to a density map #114

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Gregoire-V
Copy link
Contributor

Written by Thomas Durantel @todurante.

@Gregoire-V Gregoire-V self-assigned this Jun 6, 2024
@Gregoire-V Gregoire-V changed the title Add of a feature to convert a tracks file to a density map Feature to convert a tracks file to a density map Jun 6, 2024
@Florent2305 Florent2305 requested a review from astamm June 7, 2024 08:40
Copy link
Contributor

@Florent2305 Florent2305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks to port Thomas' work in anima.
Can you statisfy "request changes" please.

Copy link
Contributor

@Florent2305 Florent2305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks to port Thomas' work in anima.
Can you statisfy "request changes" please.

@Gregoire-V
Copy link
Contributor Author

@Florent2305 I modified the main algorithm to compute the density map, because it seems to me that Thomas Durantel's implementation has drawbacks. In this new implementation, the sgn function is no longer used, and neither is the dist variable, so these change requests no longer apply.
I also added comments to explain what is being done. In addition, I tested the related new executable with two different track files (one from Trekker tractography algorithm with a smaller step size and one from iFod2 algorithm with a higher one).
Here are the command lines that I wrote for this test:
testShapesToDensity

Could you please have a look at this new implementation of the main algorithm, and tell me if there are parts to modify?

@astamm
Copy link
Contributor

astamm commented Nov 8, 2024

@Gregoire-V Are you using this PR to push the most recent developed tool?

@Gregoire-V
Copy link
Contributor Author

@Gregoire-V Are you using this PR to push the most recent developed tool?

Yes! I talked about it with Florent yesterday and I will soon do a new commit with several changes.

This merge to put image_to_mask feature inside ShapeToDensityFeature branch, to avoid conflicts later on.
…de a file animaFibersCounter_fusion.cxx + delete previous animaFibersCounter.cxx and shapes_to_density folder
@Gregoire-V Gregoire-V marked this pull request as draft December 6, 2024 16:00
@astamm
Copy link
Contributor

astamm commented Dec 9, 2024

Thanks for the work @Gregoire-V ! Let me know when this is ready for review.

@Gregoire-V
Copy link
Contributor Author

In the binary, I added a switch argument -N that deactivates the computation of interpolation points (when two consecutive track points are separated by more than the voxel size). This enables more compatibility with the previous anima binary. However, even with this option activated, the behavior will be slightly different, since in this new binary and unlike the previous one, if a track has several points in the same voxel, we will count it once for this voxel and not [number of points] times.
After discussion with @Florent2305, we concluded that it was a better option to keep it like this, since trying to guarantee a full compatibility with previous version would make the code too complicated, with two distinct algorithms inside it. But if necessary, we can modify the code to make this binary able to have the same behavior as the previous one.

@Gregoire-V
Copy link
Contributor Author

Thanks for the work @Gregoire-V ! Let me know when this is ready for review.

Code is ready for review!

@Gregoire-V Gregoire-V marked this pull request as ready for review December 11, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants