Skip to content

Conversation

@kspaceKelvin
Copy link
Contributor

IMTYPE_REAL = 3
IMTYPE_IMAG = 4
IMTYPE_COMPLEX = 5
IMTYPE_RGB = 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where this is defined in the C++ implementation?

What does RGB mean for each of the possible ISMRMRD image types? i.e. How is RGB decoded from a 32-bit complex float? How many bits for each RGB channel if the image is 32-bit vs 16-bit?


class Dataset(object):
def __init__(self, filename, dataset_name="dataset", create_if_needed=True):
def __init__(self, filename, dataset_name="dataset", create_if_needed=True, mode=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document the valid arguments for mode: https://docs.h5py.org/en/stable/high/file.html#opening-creating-files

channels, nsamples = data.shape

if nsamples > np.iinfo(np.uint16).max:
raise TypeError(f"Array has {nsamples} samples, which is greater than the maximum of {np.iinfo(np.uint16).max}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a ValueError not a TypeError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants