-
Notifications
You must be signed in to change notification settings - Fork 579
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
ENH: Uniform access to atlas parcellations #1489
Comments
Thx for the suggestion. I like the idea of more uniform access to atlases. |
Thanks Bertrand. It seems so to me also - even representing such info in an atlas object for example, would be good for nilearn usage. This probably would require us to catalogue the atlas landscape, in terms of how they are produced (underlying modalities, is it an average, demographics of underlying subjects), how it is intended to be used, what are the alternative and invalid usages etc. ps: updated my original post, to add "and let the user supply which atlas they want, and these methods return something consistent e.g. an atlas object for example." |
I second this proposition, and would like to add that consistency of naming of all 'fine-grained' atlas attributes would also be incredibly useful. For instance, maintaining dictionaries of interchangeably used terminology for named regions and networks (if they are available) would be extraordinarily helpful to facilitate streamlined comparisons across atlases. FYI: maybe this has already been changed, but the last time I checked the Power atlas was missing network membership labels (unlike the Dosenbach 2010 atlas, for instance, where they are listed with terrific formatting!). If you need the network labels for the Power atlas to add to nilearn, they are attached to this message.[ ](url) |
Thanks Derek. Consistency in naming attributes is certainly one aspect I had mind, in addition to their validation for example. It'd be great if everyone else who utilizes different types of atlases jot down their difficulties atlas usage, the problems they may have solved themselves and what they would like to see, so I can try to design a class for that. It doesn't have to be one class, could be multiple based on their properties (volumetric, cortical, multi-resolution, multi-parcellation etc). I've a rough sketch in my mind, but I don't think it captures the use cases for other researchers (esp. the fMRI ones). pinging @GaelVaroquaux @banilo |
Thanks for the suggestion. There is certainly room for more standardization. A few thoughts:
atlas1 = datasets.fetch_atlas_1() atlas2 = datasets.fetch_atlas_2() atlas3 = datasets.fetch_atlas_3() for atlas in [atlas1, atlas2, atlas3]: ... Thinking of this code, I see a few direct improvements that we can do to the datasets fetcher:
Sorry for the really long reply. I am suggesting something that is more of an evolution of what we have than a revolution. I hope that this makes sense and sounds good. |
+1. Sounds good to me. |
Sounds good to me as well! |
Sorry for the delay - just mulling this point as and when I am able to. Short: I agree with you Gael on many of the practical considerations and issues you raise. It is definitely more pragmatic to evolve the codebase than shove a shiny new object, and choose native data structures when possible. However, I still feel strongly that my original proposal for an atlas object is worth it, atleast to put it up for good debate to identify candidates for implementation. Some of the points I have in mind are as follows:
As for whether full uniformization is possible, I agree there won't be a grand-unified atlas object, ( as brain mapping is itself an evolving field so to say :p ), but we can cover 80% use cases with two types of objects (volumetric and surface). With some care and discussion on where the object may likely change in the future ( given its an object by design), it won't be hard to add new use cases as we move forward. Sorry for the long reply, just jotting down my thoughts. Don't consider this as a blind push to implement a shiny new object, but something that may be of great use (given atlas cuts across other modalities and streams of research). |
@raamana I think your idea of uniform access to parcellations is worth to consider. Personally, I see it by making a small step-by-step implementation of the uniform idea, where the initial step is already proposed by @GaelVaroquaux . Regarding validation, Nilearn provides downloaders based on openly available. AFAIK, it is up to the publishers for providing right atlases and validation in Nilearn is for out of scope (Anybody can correct me if I am wrong). This is just my opinion on downloaders shipped with Nilearn. Moreover, validating each atlas makes API grow heavy which in result gives a collapsable form of your uniform design idea. |
@KamalakerDadi I fully agree, we should not have to check all the atlases. This would be a never-ending task. |
Perhaps I made the validation appear to be something bigger and more complicated than what it is. It's like the validation of a new Estimator class when someone wants to roll their own estimator into scikit-learn code base (make sure it is an estimator, with expected properties and behaviour). Just need to define what they are, communicate to those interested in publishing atlases into nilearn and validation. I imagine the convergence of the what will be returned by the validators (an uniform object, which everyone supports) could be a good start for specifying what is expected in an atlas of specific type (volumetric or cortical). @bthirion I imagine it will be one-time, not end-less task, as once it is defined, it will be automatic later one. Don't want to extend the discussion, but I am hoping an object will emerge as the return structure of the fetchers gets finalized. |
Thanks for the clarification. I think we mostly agree :-)) |
I'd love to. However, arriving at on the design or "structure" of the outputs returned by atlas fetchers is what I am trying to achieve here. I think @GaelVaroquaux touched up on it a bit. However, I would like it more detailed discussion and some loose consensus on the direction, before I go on implementing something ugly :) |
This is not an issue per se, but more of a discussion for improvement.
I like the dataset fetching part of nilearn, not just the individual functions, but the collection as a whole is helpful in the long run and for the newcomers. However, different methods in
nilearn.datasets
mix a few different things, especially two distinctly different things: atlases and datasets. Even for sufficiently similar things e.g.fetch_atlas_surf_destrieux
andfetch_surf_fsaverage5
, the return types are not consistent. My quick searching and skimming of issues and PRs did not show me any discussion and current work towards this (point me to existing/earlier discussion if one exists). Given people regularly compare few atlases in a study, I'll be surprised if one of you haven't already thought about this (or have some code lying around already taking care of this).In that context, I think we should consider one or a combination or variation of following:
nilearn.atlas
which contains two methods:fetch_cortical
andfetch_wholebrain
[my vote]nilearn.datasets.fetch_atlas_cortical
andnilearn.datasets.fetch_atlas_wholebrain
and let the user supply which atlas they want, and these methods return something consistent e.g. an atlas object for example.
Regardless of how we provide the functionality, I think arriving at uniform access to similar types solution is important IMHO. For example, to make visualizations of ROI-wise mean thicknesses for different atlases, I would like to be able to do the following:
So defining a standard data structure for atlases (Freesurfer annotations and label files are a good start, esp. given nibabel already supports them), regardless of where it is returned from would be great.
Looking forward to learn from you guys, and contribute to this, if found helpful to others.
The text was updated successfully, but these errors were encountered: