TomographicImaging / CILViewer

A simple Viewer for 3D data built with VTK
Apache License 2.0
8 stars 6 forks source link

Can't use Resample Readers to resample a 2D image #140

Open lauramurgatroyd opened 3 years ago

lauramurgatroyd commented 3 years ago

This is due to various assumptions including:

https://github.com/vais-ral/CILViewer/blob/b15aeaef5ffe23ff916b9a34c95595d10c5fd4ef/Wrappers/Python/ccpi/viewer/utils/conversion.py#L979

https://github.com/vais-ral/CILViewer/blob/b15aeaef5ffe23ff916b9a34c95595d10c5fd4ef/Wrappers/Python/ccpi/viewer/utils/conversion.py#L641

lauramurgatroyd commented 3 years ago

WIP here

lauramurgatroyd commented 2 years ago

Also in:

    def SetStoredArrayShape(self, value):
        if not isinstance(value, tuple):
            raise ValueError('Expected tuple, got {}'.format(type(value)))
        if len(value) != 3:
            raise ValueError(
                'Expected tuple of length 3, got {}'.format(len(value)))
        self._StoredArrayShape = value

we are assuming 3D data, but we could also support 2D and 4D datasets in the future