-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for biomedical image formats NIFTI #139
base: main
Are you sure you want to change the base?
Support for biomedical image formats NIFTI #139
Conversation
f0f7e0f
to
3745388
Compare
8e53e4f
to
b7d54af
Compare
a3f0b2c
to
ba3eab4
Compare
ba3eab4
to
fa4279d
Compare
|
||
@property | ||
def group_metadata(self) -> Dict[str, Any]: | ||
writer_kwargs = dict( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some properties get their value set as NaN
which is not a valid JSON type and should be set to null
dims_number = header_dict["dim"][0] | ||
if dims_number == 4: | ||
# According to standard the 4th dimension corresponds to 'T' time | ||
# but in special cases can be degnerate into channels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT
# but in special cases can be degnerate into channels | |
# but in special cases can be degenerate into channels |
) | ||
numerical_data = numerical_data.reshape(self.level_shape()) | ||
|
||
# Bug! data might have slope and inter and header not contain them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you detect such case? May be useful to log some warning message.
This draft PR:
from_bioimg
,to_bioimg
API calls and the respectiveConverter.Nifti
Slicer
visiblehuman
Nifti1Images
andNifti2Images
(Will split it into a different ticket)Source of the sample test images are from nibabel https://github.com/nipy/nibabel/tree/master/nibabel/tests/data