title: Python regionprops sci-kit image
body: <p>I am using sci-kit image to get the "regionprops" of a segmented image. I then wish to replace each of the segment labels with their corresponding statistic (e.g eccentricity). </p>
  
  <pre><code>from skimage import segmentation
  from skimage.measure import regionprops
  
  #a segmented image
  labels = segmentation.slic(img1, compactness=10, n_segments=200)
  propimage = labels
  #props loop
  for region in regionprops(labels1, properties ='eccentricity') :
      eccentricity = region.eccentricity 
      propimage[propimage==region] = eccentricity
  </code></pre>
  
  <p>This runs, but the propimage values do not change from their original labels</p>
  
  <p>I have also tried:</p>
  
  <pre><code>for i in range(0,max(labels)):
       prop = regions[i].eccentricity #the way to cal a single prop
       propimage[i]= prop
  </code></pre>
  
  <p>This delivers this error
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</p>
  
  <p>I am a recent migrant from matlab where I have implemented this, but the data structures used are completely different.</p>
  
  <p>Can any one help me with this? </p>
  
  <p>Thanks </p>