gbeflow/__init__.py
def contour_embryo(self,img,init=None,sigma=3):
        '''
        Fit a contour to the embryo to separate the background
        
        Parameters
        ----------
        img : 2D np.array
            2D image from a single timepoint to mask
        init : 400x2 ellipse array, optional
            Starting ellipse array that is bigger than the embryo
        sigma : int, optional 
            Kernel size for the Gaussian smoothing step
        
        Returns
        -------
        Masked image where all background points = 0
        '''

        # Assign global variables if not specified
        if init == None:
            init = self.fell

        # Fit contour based on starting ellipse
        snake = active_contour(gaussian(img, sigma),
                           init, alpha=0.015, beta=10, gamma=0.001)

        # Create boolean mask based on contour
        mask = grid_points_in_poly(img.shape, snake).T

        return(mask)

        Fit a contour to the embryo to separate the background
        
        Parameters
        ----------
        img : 2D np.array
            2D image from a single timepoint to mask
        init : 400x2 ellipse array, optional
            Starting ellipse array that is bigger than the embryo
        sigma : int, optional 
            Kernel size for the Gaussian smoothing step
        
        Returns
        -------
        Masked image where all background points = 0
        
Fit a contour to the embryo to separate the background
Parameters

img : 2D np.array
2D image from a single timepoint to mask
init : 400x2 ellipse array, optional
Starting ellipse array that is bigger than the embryo
sigma : int, optional
Kernel size for the Gaussian smoothing step

Returns

Masked image where all background points = 0
Fit a contour to the embryo to separate the background Parameters img : 2D np . array 2D image from a single timepoint to mask init : 400x2 ellipse array optional Starting ellipse array that is bigger than the embryo sigma : int optional Kernel size for the Gaussian smoothing step Returns Masked image where all background points = 0
def contour_embryo(self,img,init=None,sigma=3):
        if init == None:
            init = self.fell
        snake = active_contour(gaussian(img, sigma),
                           init, alpha=0.015, beta=10, gamma=0.001)
        mask = grid_points_in_poly(img.shape, snake).T
        return(mask)
def contour_embryo ( self , img , init = None , sigma = 3 ) : if init == None : init = self . fell snake = active_contour ( gaussian ( img , sigma ) , init , alpha = 0.015 , beta = 10 , gamma = 0.001 ) mask = grid_points_in_poly ( img . shape , snake ) . T return ( mask )
Fit a contour to the embryo to separate the background
Parameters
Fit a contour to the embryo to separate the background Parameters
'''
        Fit a contour to the embryo to separate the background
        
        Parameters
        ----------
        img : 2D np.array
            2D image from a single timepoint to mask
        init : 400x2 ellipse array, optional
            Starting ellipse array that is bigger than the embryo
        sigma : int, optional 
            Kernel size for the Gaussian smoothing step
        
        Returns
        -------
        Masked image where all background points = 0
        ''' # Assign global variables if not specified # Fit contour based on starting ellipse # Create boolean mask based on contour
self
img
init
sigma