HOA-2 / SlicerNeuroSegmentation

NeuroSegmentation extension for 3D Slicer
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Add module for importing FreeSurfer data #22

Closed Sunderlandkyl closed 4 years ago

Sunderlandkyl commented 4 years ago

Models from FreeSurfer exist in a coordinate system that is dependent on the originating volume. Generally the origin of the model coordinate system exists at the center of the mri volume.

A module to import FreeSurfer data in the correct coordinate system could be developed to allow users to select data from FreeSurfer and import it correctly. Users would choose a folder containing saved freesurfer data, and then select the desired files to import.

Relevant links: https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems http://www.grahamwideman.com/gw/brain/fs/coords/fscoords.htm http://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat

Sunderlandkyl commented 4 years ago

Current version of the module implmented here: https://github.com/Sunderlandkyl/SlicerFSImporter

Users can select volumes, segmentations, and models to be loaded into the Slicer scene from the saved data. Segmentations are automatically assigned to the expected segments based on the freesurfer lookup table.(https://github.com/Sunderlandkyl/SlicerFSImporter/blob/master/FSImporter/Resources/Data/FreeSurferColorLUT.txt)

image

lassoan commented 4 years ago

Looks great!

Can you import scalar overlays?

I think it would be more clear if the extension and repository name would be SlicerFreeSurferImporter, as th FS acronym is not specific enough in the context of all potential Slicer application areas.

Sunderlandkyl commented 4 years ago

Currently, scalar overlays cannot be imported from this module, although I've started work on adding them. I can rename the repository/extension. Let me know if you want me to put it in a different organization.

lassoan commented 4 years ago

OK. Maybe you can transfer the repository to the PerkLab organization. We didn't have the PerkLab organization earlier, so some projects were created and remained under personal accounts, but we should probably keep projects under PerkLab and use personal forks for development only.

Sunderlandkyl commented 4 years ago

I've moved the module to PerkLab. For reasons that I can't fathom, I originally made it a loadable module. Should I convert it to a scripted module while it's still small, or leave it as is?

lassoan commented 4 years ago

Since all other FreeSurfer related code is in C++, it is not bad to have this module in C++, too (if we create a SlicerFreeSurfer extension then that will have to be compiled anyway).

Could you ask for comment on discourse about moving all freesurfer related things (colormap, data importers, etc.) to an extension? It would make Slicer core simpler and smaller and allow more frequent updates in FreeSurfer support.

Sunderlandkyl commented 4 years ago

The development or support section on discourse?

lassoan commented 4 years ago

Good question. Maybe development category is a better match.

Sunderlandkyl commented 4 years ago

Topic created here: https://discourse.slicer.org/t/moving-freesurfer-support-to-an-extension/9390

Sunderlandkyl commented 4 years ago

Module available in https://github.com/PerkLab/SlicerFreeSurfer.