Example #1
0
def highMaxima3D(imIn, imOut, h, grid=m3D.DEFAULT_GRID3D):
    """
    Computes the maxima of the reconstruction of image 'imIn' by imIn - h
    and puts the result in 'imOut'.

    Grid used by the build operation can be specified by 'grid'.
    
    Only works with 8-bit or 32-bit images as input. 'imOut' must be binary.
    """
    
    imWrk = m3D.image3DMb(imIn)
    if imIn.getDepth() == 8:
        m3D.subConst3D(imIn, h, imWrk)
    else:
        m3D.floorSubConst3D(imIn, h, imWrk)
    m3D.build3D(imIn, imWrk, grid=grid)
    m3D.maxima3D(imWrk, imOut, 1, grid=grid)
Example #2
0
def highMaxima3D(imIn, imOut, h, grid=m3D.DEFAULT_GRID3D):
    """
    Computes the maxima of the reconstruction of image 'imIn' by imIn - h
    and puts the result in 'imOut'.

    Grid used by the build operation can be specified by 'grid'.
    
    Only works with 8-bit or 32-bit images as input. 'imOut' must be binary.
    """

    imWrk = m3D.image3DMb(imIn)
    if imIn.getDepth() == 8:
        m3D.subConst3D(imIn, h, imWrk)
    else:
        m3D.floorSubConst3D(imIn, h, imWrk)
    m3D.build3D(imIn, imWrk, grid=grid)
    m3D.maxima3D(imWrk, imOut, 1, grid=grid)
Example #3
0
def maxDynamics3D(imIn, imOut, h, grid=m3D.DEFAULT_GRID3D):
    """
    Extracts the maxima of 'imIn' with a dynamics higher or equal to 'h'
    and puts the result in 'imOut'.
    
    Grid used by the dual build operation can be specified by 'grid'.
    
    Only works with 8-bit or 32-bit images as input. 'imOut' must be binary.
    """
    
    imWrk = m3D.image3DMb(imIn)
    if imIn.getDepth() == 8:
        m3D.subConst3D(imIn, h, imWrk)
        m3D.build3D(imIn, imWrk, grid=grid)
        m3D.sub3D(imIn, imWrk, imWrk)
    else:
        m3D.floorSubConst3D(imIn, h, imWrk)
        m3D.build3D(imIn, imWrk, grid=grid)
        m3D.floorSub3D(imIn, imWrk, imWrk)
    m3D.threshold3D(imWrk, imOut, h, mamba.computeMaxRange(imIn[0])[1])
Example #4
0
def maxDynamics3D(imIn, imOut, h, grid=m3D.DEFAULT_GRID3D):
    """
    Extracts the maxima of 'imIn' with a dynamics higher or equal to 'h'
    and puts the result in 'imOut'.
    
    Grid used by the dual build operation can be specified by 'grid'.
    
    Only works with 8-bit or 32-bit images as input. 'imOut' must be binary.
    """

    imWrk = m3D.image3DMb(imIn)
    if imIn.getDepth() == 8:
        m3D.subConst3D(imIn, h, imWrk)
        m3D.build3D(imIn, imWrk, grid=grid)
        m3D.sub3D(imIn, imWrk, imWrk)
    else:
        m3D.floorSubConst3D(imIn, h, imWrk)
        m3D.build3D(imIn, imWrk, grid=grid)
        m3D.floorSub3D(imIn, imWrk, imWrk)
    m3D.threshold3D(imWrk, imOut, h, mamba.computeMaxRange(imIn[0])[1])