Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

labeling and region extraction

Help
Arielle
2014-07-29
2014-07-30
  • Arielle
    Arielle
    2014-07-29

    Hey everyone!

    I would like to calculate the number of connected components I have in a 3d image (dcm) and finally to find the biggest one!
    I used the cimg function get_label() and indeed I display all my image regions but it doesn't give me any information(number, size of region,...)!
    So I want to know how I can extract each "region subarrays" after labeling?
    Any ideas?

    Arielle.

     
    • Karsten
      Karsten
      2014-07-29

      Hi,

      label returns the given array with each voxel with a unique number which identifies the respective connected region. The max of the result is the number of connected regions. The size of each region x is the total sum, the number of true voxels (typically eq 1) over the result of "labeled_region == x". The "region subarray" has to be extracted e.g. as the list of coordinates with value "true".

      Regards
      Karsten

      Am 29.07.2014 um 15:50 schrieb Arielle arylawson@users.sf.net:

      Hey everyone!

      I would like to calculate the number of connected components I have in a 3d image (dcm) and finally to find the biggest one!
      I used the cimg function get_label() and indeed I display all my image regions but it doesn't give me any information(number, size of region,...)!
      So I want to know how I can extract each "region subarrays" after labeling?
      Any ideas?

      Arielle.

      labeling and region extraction

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cimg/discussion/334630/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      Attachments
  • Arielle
    Arielle
    2014-07-30

    Thank you Karsten for this information!! It helped me a lot!

    Regards,

    Arielle.