Skip to content

simple itk functions ? (resampling & registration) [FEATURE] #111

@gattia

Description

@gattia

Is your feature request related to a problem? Please describe.
No problems. Just wanted bring up some thoughts or ideas.

Describe the solution you'd like
Thanks for contributing this library. I quite like the overall library format. I've personally used simpleitk (sitk) quite a bit. But, most of the time I am just using it as a means of importing and exporting data and then do much of my processing in numpy and other python libraries. From that standpoint, this library seems like a great option to represent data in numpy format for interoperability with other libraries.

Anyways, to see if I could transition to this library instead of sitk I went through my code-base and looked at sitk functions that I most heavily relied on. Based on that review, there were two areas I was wondering about - image IO and image resampling.

Resampling
The main function that I don't currently see present in DOSMA but that I know I've used heavily is an image resampling function. Im thinking: 1) resampling image to specified dimension parameters (origin, spacing, volume size) using different methods - nearest neighbour, linear, bspline and 2) resampling within the space (grid) of another image (really, this should just be a special case or helper function related to (1).

Are there any thoughts about incorporating an image resampling function (other than those in Elastix - which I think is itk under the hood)? And if so, what sort of path you were thinking about?

Image IO
For simplicity, I've always saved outputs using .nrrd as it seems to be what was recommended (adopted) by the itk/3D slicer community that I learned/started with. The other format that I've used a bit and is more obscure is par/rec (Philips scanners).

I've used nibable to read par/rec before, and since dosma already uses nibabel to read .nii Im guessing this could relatively easily be added? Im just thinking about reading here, I really dont see a need to save par/rec files. Would this be something you consider adding?

As for .nrrd, it looks like nibabel folks have been meaning to add it for a while but maybe haven't (nipy/nibabel#356). Seems like pynrrd (https://pypi.org/project/pynrrd/) could be a lightweight option that might be the backbone to whatever nibabel uses anyways. Or, sitk can also do this reading and writing, but it is obviously a bigger library that you may not want to include as a dependency.

Those are the two things that I was mostly wondering about when reading through the documentation and examples. Beyond this, I think there are some functions in sitk that could be useful and tend to be fast because they are C++ based. However, Im thinking that the DOMA built-in functions to convert a MedicalVolume to .sitk image format and back would enable users to easily use sitk filters if they had a use case.

Thanks again for contributing!

Anthony

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions