Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@deprecation.deprecated(reason="Prefer using 'bytecode'", deprecated_since="0.10.0beta")
def getByteCode(self):
return self.bytecode
@deprecation.deprecated(reason="Prefer using 'img.data'", deprecated_since="0.10.0beta")
def getData(self):
"""
getter for edf Data
:return: data for current frame
:rtype: numpy.ndarray
"""
return self.data
@deprecation.deprecated(reason="This call to 'setNbFrames' does nothing and should be removed", deprecated_since="0.10.0beta")
def setNbFrames(self, val):
"""
Setter for number of frames ... should do nothing. Here just to avoid bugs
"""
if val != len(self._frames):
logger.warning("Setting the number of frames is not allowed.")
@deprecation.deprecated(reason="dim2 should not be updated", deprecated_since="0.10.0beta")
def dim2(self, value):
self.__set_dim2(value)
@deprecation.deprecated(reason="Setting bytecode is not anymore allowed. If the data is not set use dtype instead.", deprecated_since="0.10.0beta")
def setByteCode(self, iVal=None, _iVal=None):
raise NotImplementedError("No more implemented")
@deprecation.deprecated(reason="Prefer using 'del img.data'", deprecated_since="0.10.0beta")
def delData(self):
"""
deleter for edf Data
"""
self._frames[self.currentframe].data = None
@deprecation.deprecated(reason="Prefer using 'getEdfBlock'", deprecated_since="0.10.0beta")
def getEdfBlock(self, force_type=None, fit2dMode=False):
return self.get_edf_block(force_type, fit2dMode)
@deprecation.deprecated(reason="Prefer using 'dim2'", deprecated_since="0.10.0beta")
def getDim2(self):
return self._frames[self.currentframe].dim2
@deprecation.deprecated(reason="Prefer using 'img.header ='", deprecated_since="0.10.0beta")
def setHeader(self, _dictHeader):
"""
Enforces the propagation of the header to the list of frames
"""
frame = self._get_any_frame()
frame.header = _dictHeader
@deprecation.deprecated
def factory(cls, name):
"""A kind of factory... for image_classes
:param str name: name of the class to instantiate
:return: an instance of the class
:rtype: fabio.fabioimage.FabioImage
"""
from . import fabioformats
return fabioformats.factory(name)