You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hi Anthony, thank you for your interest in DOSMA and for these use cases! I've added some thoughts below
Resampling: The plan is to have resampling supported natively with minimal dependency on other packages. I'm thinking they should only use numpy/cupy ops to avoid any latency that can often be hidden when relying on other packages. As you mentioned, case (2) is an extension of (1), so these should be quite easy to add. NN, linear, bspline are all good interpolation methods that should be supported in this op.
Image IO: Nrrd is definitely on the list of formats to support - dosma should have support for it in the near future. dosma also has planned support for the parrec format, but requires a bit more nuanced design. We will need to map the header fields in parrec/nibabel.ParRecHeader to the appropriate fields in pydicom headers, which DOSMA uses as the base metadata handler. Happy to accept a PR for this if you're interested!
That sounds great for the resampling & the nrrd support. Really, I think those are the main points. Parrec is definitely more niche. As I get some time I'll take a peak at mapping the parrec headers into the approriate pydicom ones.
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.
The text was updated successfully, but these errors were encountered: