menpo/image/base.py
def _build_warped_to_mask(self, template_mask, sampled_pixel_values):
        r"""
        Builds the warped image from the template mask and sampled pixel values.
        Overridden for :map:`BooleanImage` as we can't use the usual
        :meth:`from_vector_inplace` method. All other :map:`Image` classes
        share the :map:`Image` implementation.

        Parameters
        ----------
        template_mask : :map:`BooleanImage` or 2D `bool ndarray`
            Mask for warping.
        sampled_pixel_values : ``(n_true_pixels_in_mask,)`` `ndarray`
            Sampled value to rebuild the masked image from.
        """
        from menpo.image import MaskedImage
        warped_image = MaskedImage.blank(template_mask.shape,
                                         n_channels=self.n_channels,
                                         mask=template_mask)
        warped_image.from_vector_inplace(sampled_pixel_values.ravel())
        return warped_image
r"""
        Builds the warped image from the template mask and sampled pixel values.
        Overridden for :map:`BooleanImage` as we can't use the usual
        :meth:`from_vector_inplace` method. All other :map:`Image` classes
        share the :map:`Image` implementation.

        Parameters
        ----------
        template_mask : :map:`BooleanImage` or 2D `bool ndarray`
            Mask for warping.
        sampled_pixel_values : ``(n_true_pixels_in_mask,)`` `ndarray`
            Sampled value to rebuild the masked image from.
        
r"""
Builds the warped image from the template mask and sampled pixel values.
Overridden for :map:`BooleanImage` as we can't use the usual
r " " " Builds the warped image from the template mask and sampled pixel values . Overridden for : map : ` BooleanImage ` as we can ' t use the usual
def _build_warped_to_mask(self, template_mask, sampled_pixel_values):
        from menpo.image import MaskedImage
        warped_image = MaskedImage.blank(template_mask.shape,
                                         n_channels=self.n_channels,
                                         mask=template_mask)
        warped_image.from_vector_inplace(sampled_pixel_values.ravel())
        return warped_image
def _build_warped_to_mask ( self , template_mask , sampled_pixel_values ) : from menpo . image import MaskedImage warped_image = MaskedImage . blank ( template_mask . shape , n_channels = self . n_channels , mask = template_mask ) warped_image . from_vector_inplace ( sampled_pixel_values . ravel ( ) ) return warped_image
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.
        Overridden for :map:`BooleanImage` as we can't use the usual
        :meth:`from_vector_inplace` method. All other :map:`Image` classes
        share the :map:`Image` implementation.

        Parameters
        ----------
        template_mask : :map:`BooleanImage` or 2D `bool ndarray`
            Mask for warping.
        sampled_pixel_values : ``(n_true_pixels_in_mask,)`` `ndarray`
            Sampled value to rebuild the masked image from.
        """
self
template_mask
sampled_pixel_values
meth
`from_vector_inplace` method. All other :map:`Image` classes
share the :map:`Image` implementation.

Parameters

template_mask : :map:`BooleanImage` or 2D `bool ndarray`
Mask for warping.
sampled_pixel_values : ``(n_true_pixels_in_mask,)`` `ndarray`
Sampled value to rebuild the masked image from.
` from_vector_inplace ` method . All other : map : ` Image ` classes share the : map : ` Image ` implementation . Parameters template_mask : : map : ` BooleanImage ` or 2D ` bool ndarray ` Mask for warping . sampled_pixel_values : ` ` ( n_true_pixels_in_mask ) ` ` ` ndarray ` Sampled value to rebuild the masked image from .