Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 187108b3 authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

Change in the peak distance of contactOrientation

parent 5ca02861
Pipeline #47938 passed with stages
in 23 minutes and 46 seconds
......@@ -471,7 +471,7 @@ def localDetection(subVolGrey,localThreshold,radiusThresh=None):
return CONTACT
def contactOrientations(volBin, volLab, watershed="ITK", peakDistance=5, markerShrink=True):
def contactOrientations(volBin, volLab, watershed="ITK", peakDistance=1, markerShrink=True):
"""
determines contact normal orientation between two particles
uses the random walker implementation from skimage
......@@ -492,7 +492,7 @@ def contactOrientations(volBin, volLab, watershed="ITK", peakDistance=5, markerS
peakDistance : int, optional
Distance in pixels used in skimage.feature.peak_local_max
Default value is 5
Default value is 1
markerShrink : boolean
shrinks the markers to contain only one voxel.
......@@ -547,8 +547,8 @@ def contactOrientations(volBin, volLab, watershed="ITK", peakDistance=5, markerS
distanceMapA = scipy.ndimage.morphology.distance_transform_edt(subVolBinA)
distanceMapB = scipy.ndimage.morphology.distance_transform_edt(subVolBinB)
#Calculate local Max
localMaxiA = skimage.feature.peak_local_max(distanceMapA, min_distance=5, indices=False, exclude_border=True, labels=subVolBinA)
localMaxiB = skimage.feature.peak_local_max(distanceMapB, min_distance=5, indices=False, exclude_border=True, labels=subVolBinB)
localMaxiA = skimage.feature.peak_local_max(distanceMapA, min_distance=peakDistance, indices=False, exclude_border=False, labels=subVolBinA)
localMaxiB = skimage.feature.peak_local_max(distanceMapB, min_distance=peakDistance, indices=False, exclude_border=False, labels=subVolBinB)
#Label de Peaks
struc = numpy.ones((3,3,3))
markersA, numMarkersA = scipy.ndimage.measurements.label(localMaxiA, structure=struc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment