Skip to content
Snippets Groups Projects
Commit d29a9d6b authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Added convenience property to get XYZ ndarray on mono arrays

parent 22478a7d
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,13 @@ class GenericImageDataAccessor(ABC):
else:
return self.data[:, :, 0, 0]
@property
def data_xyz(self) -> np.ndarray:
if not self.nc == 1:
raise InvalidDataShape('Can only return XYZ array from accessors with a single channel')
else:
return self.data[:, :, 0, :]
def _gc(self, channels):
return self.get_channels(list(channels))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment