o  ië ã@sndZddlmZgd¢ZddlmZGdd„dƒZGdd„dƒZGd d „d ƒZGd d „d ƒZ Gd d„dƒZ dS)z6 A collection of generic traits for MONAI transforms. é)Ú annotations)Ú LazyTraitÚInvertibleTraitÚRandomizableTraitÚMultiSampleTraitÚ ThreadUnsafe)ÚAnyc@s8eZdZdZedd„ƒZejd dd„ƒZedd„ƒZd S) ra¢ An interface to indicate that the transform has the capability to execute using MONAI's lazy resampling feature. In order to do this, the implementing class needs to be able to describe its operation as an affine matrix or grid with accompanying metadata. This interface can be extended from by people adapting transforms to the MONAI framework as well as by implementors of MONAI transforms. cCótƒ‚)z¶ Get whether lazy evaluation is enabled for this transform instance. Returns: True if the transform is operating in a lazy fashion, False if not. ©ÚNotImplementedError©Úself©rúY/home/dell461/cl/sdc2/last_ska_mid/HISourceFinder-master-l/src/monai/transforms/traits.pyÚlazyózLazyTrait.lazyÚenabledÚboolcCr )z¾ Set whether lazy evaluation is enabled for this transform instance. Args: enabled: True if the transform should operate in a lazy fashion, False if not. r )r rrrrr(rcCsdS)aI Get whether the transform requires the input data to be up to date before the transform executes. Such transforms can still execute lazily by adding pending operations to the output tensors. Returns: True if the transform requires its inputs to be up to date and False if it does not Nrr rrrÚrequires_current_data1szLazyTrait.requires_current_dataN)rr)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚpropertyrÚsetterrrrrrrs  rc@seZdZdZddd„ZdS) rzž An interface to indicate that the transform can be inverted, i.e. undone by performing the inverse of the operation performed during `__call__`. ÚdatarÚreturncCr )Nr )r rrrrÚinverseAszInvertibleTrait.inverseN)rrrr)rrrrrrrrrr;src@óeZdZdZdS)ra" An interface to indicate that the transform has the capability to perform randomized transforms to the data that it is called upon. This interface can be extended from by people adapting transforms to the MONAI framework as well as by implementors of MONAI transforms. N©rrrrrrrrrEórc@r)ra: An interface to indicate that the transform has the capability to return multiple samples given an input, such as when performing random crops of a sample. This interface can be extended from by people adapting transforms to the MONAI framework as well as by implementors of MONAI transforms. NrrrrrrPr rc@r)ra\ A class to denote that the transform will mutate its member variables, when being applied. Transforms inheriting this class should be used cautiously in a multi-thread context. This type is typically used by :py:class:`monai.data.CacheDataset` and its extensions, where the transform cache is built with multiple threads. Nrrrrrr[s rN) rÚ __future__rÚ__all__ÚtypingrrrrrrrrrrÚs  %