Commit edb5d4ac authored by Thomas Vincent's avatar Thomas Vincent

remove image_binning writer from hdf5 file wrapper

parent d384e98b
......@@ -195,9 +195,11 @@ class QSpaceH5(XsocsH5Base):
@property
def image_binning(self):
"""
Returns the image binning used when converting to q space.
:return:
"""Returns the image binning used when converting to q space.
This is deprecated as no more created during conversion.
It is kept for displaying the information for files
produced with older version of xsocs.
"""
path = self.params_path + '/image_binning'
return self._get_array_data(path)
......@@ -205,9 +207,8 @@ class QSpaceH5(XsocsH5Base):
@property
def medfilt_dims(self):
"""
Returns the dimensions of the median filter applied after the image
binning when converting to q space.
:return:
Returns the dimensions of the median filter applied when
converting to q space.
"""
path = self.params_path + '/medfilt_dims'
return self._get_array_data(path)
......@@ -429,24 +430,12 @@ class QSpaceH5Writer(QSpaceH5):
path = self.params_path + '/image_normalizer'
self._create_dataset(path, data=text_type(normalizer))
def set_image_binning(self, image_binning):
"""
Stores the image binning used when converting to q space
:param image_binning: a 2 elements array.
:return:
"""
path = self.params_path + '/image_binning'
if image_binning is None or len(image_binning) != 2:
raise ValueError('image_binning must be a 2 elements array : '
'{0}.'.format(image_binning))
self._set_array_data(path, _np.array(image_binning))
def set_medfilt_dims(self, medfilt_dims):
"""
Stores the dimensions of the median filter applied after the image
binning when converting to q space.
Stores the dimensions of the median filter applied when
converting to q space.
:param medfilt_dims: a 2 elements array.
:return:
"""
path = self.params_path + '/medfilt_dims'
if medfilt_dims is None or len(medfilt_dims) != 2:
......
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