(self, src_pts)
return dst_pts
This method performs the FFD to `src_pts` and return the deformed
        points.
        
        :param numpy.ndarray src_pts: the array of dimensions (*n_points*, *3*)
            containing the points to deform. The points have to be arranged by
            row.
        :return: the deformed points
        :rtype: numpy.ndarray (with shape = (*n_points*, *3*))
This method performs the FFD to `src_pts` and return the deformed
        points.
        
        :param numpy.ndarray src_pts: the array of dimensions (*n_points*, *3*)
            containing the points to deform. The points have to be arranged by
            row.
        :return: the deformed points
        :rtype: numpy.ndarray (with shape = (*n_points*, *3*))
This method performs the FFD to src_pts and return the deformed points . : param numpy . ndarray src_pts : the array of dimensions ( * n_points * * 3 * ) containing the points to deform . The points have to be arranged by row . : return : the deformed points : rtype : numpy . ndarray ( with shape = ( * n_points * * 3 * ))
def __call__(self, src_pts):
        """
        This method performs the FFD to `src_pts` and return the deformed
        points.
        
        :param numpy.ndarray src_pts: the array of dimensions (*n_points*, *3*)
            containing the points to deform. The points have to be arranged by
            row.
        :return: the deformed points
        :rtype: numpy.ndarray (with shape = (*n_points*, *3*))
        """
        def is_inside(pts, boundaries):
            """ 
            Check is `pts` is inside the ranges provided by `boundaries`.
            """
            return np.all(np.logical_and(pts >= boundaries[0],
                                         pts <= boundaries[1]),
                          axis=1)

        # map to the reference domain
        src_reference_frame_pts = self.psi(src_pts - self.box_origin)

        # apply deformation for all the pts in the unit cube
        index_pts_inside = is_inside(src_reference_frame_pts,
                                     np.array([[0., 0., 0.], [1., 1., 1.]]))
        shifted_reference_frame_pts = self.T(
            src_reference_frame_pts[index_pts_inside])

        # map to the physical domain
        shifted_pts = self.inverse_psi(
            shifted_reference_frame_pts) + self.box_origin

        dst_pts = src_pts.copy()
        dst_pts[index_pts_inside] = shifted_pts
        return dst_pts
def __call__ ( self , src_pts ) : def is_inside ( pts , boundaries ) : """ 
            Check is `pts` is inside the ranges provided by `boundaries`.
            """ return np . all ( np . logical_and ( pts >= boundaries [ 0 ] , pts <= boundaries [ 1 ] ) , axis = 1 ) # map to the reference domain src_reference_frame_pts = self . psi ( src_pts - self . box_origin ) # apply deformation for all the pts in the unit cube index_pts_inside = is_inside ( src_reference_frame_pts , np . array ( [ [ 0. , 0. , 0. ] , [ 1. , 1. , 1. ] ] ) ) shifted_reference_frame_pts = self . T ( src_reference_frame_pts [ index_pts_inside ] ) # map to the physical domain shifted_pts = self . inverse_psi ( shifted_reference_frame_pts ) + self . box_origin dst_pts = src_pts . copy ( ) dst_pts [ index_pts_inside ] = shifted_pts return dst_pts