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

Transforming coordinates and images #3

Closed
tsalo opened this issue Feb 6, 2018 · 4 comments
Closed

Transforming coordinates and images #3

tsalo opened this issue Feb 6, 2018 · 4 comments
Labels
question Further information is requested

Comments

@tsalo
Copy link
Member

tsalo commented Feb 6, 2018

@tyarkoni At what point should the coordinates and images be transformed to the same template? I know you had some thoughts on that, but I can't remember the specifics. I'm currently working on a function to download images from NeuroVault and coordinates from NeuroSynth (or maybe that should be brainspell) and merge the two into one Dataset object, and I'm not sure if I should transform everything into the same space as part of compiling the database or if I should leave it until a later step (e.g., the meta-analysis stage).

@tyarkoni
Copy link
Contributor

tyarkoni commented Feb 7, 2018

Good question. We can iterate, but I guess my initial feeling is that things should be left in their native space in a Database object (or whatever it ends up being called), and only transformed when constructing a Dataset-like object that gets fed to a specific estimator.

@tsalo
Copy link
Member Author

tsalo commented Feb 9, 2018

That makes sense, especially for users planning to perform smaller meta-analyses fairly rarely. For those interested in running large numbers of meta-analyses with different samples, shifting all of the transformations to the dataset selection phase would be problematic.

I don't know how much you want to design nimare to work around Neurovault and Neurosynth/brainspell, but pyneurovault doesn't return detailed space information. It really only says whether the map is in MNI space or not. Plus, it resamples to a target image as it downloads the images, which makes it easier to pull together a database with images all in the same space, as long as we only pull MNI images from Neurovault.

As a compromise, we could release the full combined database in its raw form, with coordinates and images in whatever space they were originally provided in (ignoring, for the moment, surfaces and connectivity matrices), along with an MNI 2mm version with all of the data in the same space. This way, rapid, large-scale analyses can be performed on the resampled version of the database, while more content-oriented users can transform data to whatever space/resolution they want (MNI 1mm, Talairach, etc.) during dataset selection. And, of course, all of the meta-analytic algorithms would be agnostic to space.

In terms of the code, I think this means that we'll want the get methods for Database to returns lists of ids, and we'll need something like select_contrasts to return a Dataset from a Database based on a set of ids. The select_contrasts method can include a target argument for specifying what space to transform the images and/or coordinates into.

How does that sound?

@tsalo
Copy link
Member Author

tsalo commented Mar 20, 2018

I'm not sure if this belongs in a separate issue, but I'm coming up against a bit of a wall when it comes to images. In order to push transforming images to the same space until dataset selection, I think we'll need to include both a set of templates/masks and transforms between those templates in the package resources. That way, users can just specify their target when they call Database.get_dataset. If there are no canonical transforms out there to warp images between the main stereotactic spaces, which I don't think there are, I can start generating them.

We'll need some way to apply the transforms as well (e.g., FSL), which means we'll need a Docker image for the package, right?

To get a list of templates and their names, I was thinking we could use the NIDM Results specification. I haven't looked too deeply into the specification beyond the coordinate system names, but it seems like we should make NiMARE as compatible with it as possible. What do you think?

@tsalo tsalo added the question Further information is requested label May 25, 2018
@tsalo
Copy link
Member Author

tsalo commented Jun 11, 2019

I think we've come to a consensus regarding when and how to transform coordinates in other threads, so I'm going to close this now.

@tsalo tsalo closed this as completed Jun 11, 2019
jdkent pushed a commit to jdkent/NiMARE that referenced this issue Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants