menpo/image/boolean.py
def _build_warped_to_mask(self, template_mask, sampled_pixel_values,
                              **kwargs):
        r"""
        Builds the warped image from the template mask and sampled pixel values.
        """
        # start from a copy of the template_mask
        warped_img = template_mask.copy()
        if warped_img.all_true():
            # great, just reshape the sampled_pixel_values
            warped_img.pixels = sampled_pixel_values.reshape(
                warped_img.shape + (1,))
        else:
            # we have to fill out mask with the sampled mask..
            warped_img.pixels[warped_img.mask] = sampled_pixel_values
        return warped_img
r"""
        Builds the warped image from the template mask and sampled pixel values.
        
r"""
Builds the warped image from the template mask and sampled pixel values.
r " " " Builds the warped image from the template mask and sampled pixel values .
def _build_warped_to_mask(self, template_mask, sampled_pixel_values,
                              **kwargs):
        warped_img = template_mask.copy()
        if warped_img.all_true():
            warped_img.pixels = sampled_pixel_values.reshape(
                warped_img.shape + (1,))
        else:
            warped_img.pixels[warped_img.mask] = sampled_pixel_values
        return warped_img
def _build_warped_to_mask ( self , template_mask , sampled_pixel_values , ** kwargs ) : warped_img = template_mask . copy ( ) if warped_img . all_true ( ) : warped_img . pixels = sampled_pixel_values . reshape ( warped_img . shape + ( 1 , ) ) else : warped_img . pixels [ warped_img . mask ] = sampled_pixel_values return warped_img
r"""
Builds the warped image from the template mask and sampled pixel values.
r " " " Builds the warped image from the template mask and sampled pixel values .
r"""
        Builds the warped image from the template mask and sampled pixel values.
        """ # start from a copy of the template_mask # great, just reshape the sampled_pixel_values # we have to fill out mask with the sampled mask..
self
template_mask
sampled_pixel_values