def __init__(self,
                 shear_range,
                 reference=None,
                 lazy=False):
        """
        Initialize a RandomRotate3D object

        Arguments
        ---------
        shear_range : list or tuple
            Lower and Upper bounds on rotation parameter, in degrees.
            e.g. shear_range = (-10,10) will result in a random
            draw of the rotation parameters between -10 and 10 degrees

        reference : ANTsImage (optional but recommended)
            image providing the reference space for the transform.
            this will also set the transform fixed parameters.

        lazy : boolean (default = False)
            if True, calling the `transform` method only returns
            the randomly generated transform and does not actually
            transform the image
        """
        if (not isinstance(shear_range, (list, tuple))) or (len(shear_range) != 2):
            raise ValueError('shear_range argument must be list/tuple with two values!')

        self.shear_range = shear_range
        self.reference = reference
        self.lazy = lazy
def __init__ ( self , shear_range , reference = None , lazy = False ) : if ( not isinstance ( shear_range , ( list , tuple ) ) ) or ( len ( shear_range ) != 2 ) : raise ValueError ( 'shear_range argument must be list/tuple with two values!' ) self . shear_range = shear_range self . reference = reference self . lazy = lazy
Initialize a RandomRotate3D object

        Arguments
        ---------
        shear_range : list or tuple
            Lower and Upper bounds on rotation parameter, in degrees.
            e.g. shear_range = (-10,10) will result in a random
            draw of the rotation parameters between -10 and 10 degrees

        reference : ANTsImage (optional but recommended)
            image providing the reference space for the transform.
            this will also set the transform fixed parameters.

        lazy : boolean (default = False)
            if True, calling the `transform` method only returns
            the randomly generated transform and does not actually
            transform the image