Commit 744e6dbf authored by Pierre Paleo's avatar Pierre Paleo
Browse files

HDF5TomoScan: swap dim_1 and dim_2

parent 9525bd3b
......@@ -435,18 +435,14 @@ class HDF5TomoScan(TomoScanBase):
@property
def dim_1(self) -> typing.Union[None, int]:
if self._dim_1 is None and self.master_file and os.path.exists(self.master_file):
if self.projections is not None:
if len(self.projections) > 0:
self._dim_1, self._dim_2 = get_data(list(self.projections.values())[0]).shape
if self._dim_1 is None:
self._get_dim1_dim2()
return self._dim_1
@property
def dim_2(self) -> typing.Union[None, int]:
if self._dim_2 is None and self.master_file and os.path.exists(self.master_file):
if self.projections is not None:
if len(self.projections) > 0:
self._dim_1, self._dim_2 = get_data(list(self.projections.values())[0]).shape
if self._dim_2 is None:
self._get_dim1_dim2()
return self._dim_2
@property
......@@ -470,6 +466,12 @@ class HDF5TomoScan(TomoScanBase):
_y_pixel_size = self._get_value(y_pixel_dataset, default_unit='mm')
return _x_pixel_size, _y_pixel_size
def _get_dim1_dim2(self):
if self.master_file and os.path.exists(self.master_file):
if self.projections is not None:
if len(self.projections) > 0:
self._dim_2, self._dim_1 = get_data(list(self.projections.values())[0]).shape
@property
def y_pixel_size(self) -> typing.Union[None, float]:
if (self._y_pixel_size is None and self.master_file and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment