python-bioformats
python-bioformats copied to clipboard
AttributeError: 'OMETiffWriter' object has no attribute 'class_name'
There was a previous issue on this but it was closed without answer. I'm trying to instantiate the bioformats.OMETiffWriter class but it crashes on instantiation:
writer = bf.OMETiffWriter()
AttributeError: 'OMETiffWriter' object has no attribute 'class_name'
The same issue is apparently still present. This also seems to be the only way to save tiled images.
OMETiffWriter points to a creator function:
OMETiffWriter = _formatwriter.make_ome_tiff_writer_class()
which in turn defines a class with the same name:
def make_ome_tiff_writer_class():
...
class OMETiffWriter(IFormatWriter):
...
return OMETiffWriter
Should this function have returned an instance instead of a reference to the class? Trying to instantiate this reference fails, presumably as the context IFormatWriter etc only existed within that function.