Skip to content

Segmentations #31

Open
Erasdna wants to merge 7 commits intoscientificcomputing:mainfrom
Erasdna:main
Open

Segmentations #31
Erasdna wants to merge 7 commits intoscientificcomputing:mainfrom
Erasdna:main

Conversation

@Erasdna
Copy link

@Erasdna Erasdna commented Mar 13, 2026

Add Segmentation class with FreeSurfer labels, make io go through MRIData, rework of stats dataframe function.

Tests are passing.

@Erasdna Erasdna requested a review from finsberg March 13, 2026 12:33
@Erasdna Erasdna closed this Mar 13, 2026
@Erasdna Erasdna reopened this Mar 13, 2026
@finsberg finsberg requested a review from cdaversin March 16, 2026 00:48
@finsberg
Copy link
Member

Thanks @Erasdna for the PR! I fixed the merge conflicts and made some changes. Would be great if you could have a look an see if it make sense? I am also not sure about the changes in the compute_stats module. Would be good to get an opinion from @cdaversin as well.

@cdaversin could you take a look?

@Erasdna
Copy link
Author

Erasdna commented Mar 16, 2026

Thanks!

Part of my thinking was that it could be useful to be able to specify which statistics you want to compute, and then store them as a pivot table, i.e, one value column and multiple grouping columns (which I think is often an advantage for later processing). Maybe the two generate dataframe functions should operate in a more similar way? Computing an unnecessary number of statistics can sometimes take too much time imo (but the specific implementation of this is maybe not optimal as it stands)

I also think it would be useful to decide on whether functions should take a Path or an MRIdata/Segmentation object as input (this applies several places). I would like to add some more functionality to modify segmentations etc, which would make passing the class object a bit more practical, I think.

I am also curious about the regex stuff @cdaversin, to me it seems a little bit convoluted sometimes. I added a way to directly read patient info assuming that files follow the bids convention (which is sota I believe). Would maybe be nice to stick to that? We should probably also make some way to generate filenames according to bids?

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.

2 participants