TIFFWriter: enable back single 2D tiff
Since the backend changed to tomoscan.volume
, single tiff image cannot be written anymore (only 3D image or series of 2D).
Admittedly this is not the primary purpose of TIFFWriter but it's good to have this feature back.
if self.start_index is None: # default
url = DataUrl(file_path=dirname(self.fname), data_path="basename(self.fname).tiff", scheme="tifffile")
volume = TIFFVolume(volume_basename=basename(self.fname), data_url=url)
volume.data = img
volume.save()