[ITK] Determine surface area of certain region in image

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Wed Aug 10 09:26:05 EDT 2016


What do you mean by “add the label on the 3D image”? Do you have an example? Are you talking about composing the label image (binary image) with the grayscale image?

Brad

On Aug 10, 2016, at 9:19 AM, Matthias B <matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>> wrote:

I understand, but how do I add the label on the 3D image programmatically?
preferable in C#, but C++ is also ok.

Thank you for your help
________________________________
From: dzenanz at gmail.com<mailto:dzenanz at gmail.com>
Date: Wed, 10 Aug 2016 09:14:35 -0400
Subject: Re: [ITK] Determine surface area of certain region in image
To: matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>
CC: blowekamp at mail.nih.gov<mailto:blowekamp at mail.nih.gov>; dan.muel at gmail.com<mailto:dan.muel at gmail.com>; community at itk.org<mailto:community at itk.org>

The 3D image where the label will be applied is need for statistics such as mean, min and max values. If you don't care about those, you can supply the same image as both label and original (intensity) image. Or you can supply an empty (all black) image there.

HTH,
Dženan

On Wed, Aug 10, 2016 at 8:47 AM, Matthias B <matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>> wrote:
Thank you for answering Dženan,

ok, the perimeter attribute is what I need.

Problem is that I don't see a way where I can
1. Choose a label image to define the region
2. Choose the 3D Image where the label will be aplied

At this moment it looks for me that the label image already contains the 3D data, which confuses me.

________________________________
From: dzenanz at gmail.com<mailto:dzenanz at gmail.com>
Date: Wed, 10 Aug 2016 08:32:53 -0400
Subject: Re: [ITK] Determine surface area of certain region in image
To: matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>
CC: blowekamp at mail.nih.gov<mailto:blowekamp at mail.nih.gov>; community at itk.org<mailto:community at itk.org>


Hi Matthias,

perimeter should be surface area in 3D (which you can divide by 2 to eliminate back side if you have a very flat object). In 2D image, it is the circumference. In 2D image, you can get object's surface area by counting how many pixels it has and then multiplying that by the size of each pixel (spacing[0]*spacing[1]).

Regards,
Dženan

On Wed, Aug 10, 2016 at 2:40 AM, Matthias B <matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>> wrote:
Thank you for answering!

At this moment I get the perimeter in pixel units (not the surface area of my X,Y-data) of my labeled image.
I have also really no idea how to use my 3D data with a labeled image. I see no way how to add 3D data to a LabelMap for example.

This is what I have at the moment.
Dim labelShapeStatistics = New simple.LabelShapeStatisticsImageFilter()
labelShapeStatistics.Execute(labelImage)
Dim perimeterValue= labelShapeStatistics.GetPerimeter(1)

Thanks for any help, Matthias



________________________________
From: blowekamp at mail.nih.gov<mailto:blowekamp at mail.nih.gov>
To: matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>
CC: community at itk.org<mailto:community at itk.org>
Subject: Re: [ITK] Determine surface area of certain region in image
Date: Tue, 9 Aug 2016 15:58:56 +0000


Hello,

You should look into the label map framework [1]. In particular the LabelImageToShapeLabelMapFilter[2] and the Perimeter attribute [3] [4].

HTH,
Brad

[1] http://hdl.handle.net/1926/584
[2] https://itk.org/Doxygen/html/classitk_1_1LabelImageToShapeLabelMapFilter.html
[3] https://itk.org/Doxygen/html/classitk_1_1ShapeLabelObject.html#aff1209e925293c15775520ef89e97afb
[4] http://hdl.handle.net/10380/3342

On Aug 9, 2016, at 11:50 AM, Matthias B <matthias.b at hotmail.com<mailto:matthias.b at hotmail.com>> wrote:

Hello ITK-community,

At the moment I'm working with 3D Images with following structure: 100x80x3. Every pixel contains a X,Y,Z value.
I want to calculate the surface area of a certain region that I have defined with a boolean 2D-Image (100x80).
The surface area should only be calculated with the X,Y-data.

In Matlab I have experience with this by using the function bwboundaries on the boolean image. This function determines the indices of the the boundaries in clockwise direction.  Next I take the corresponding X,Y values of the indices so I can calculate the surface area with the function polyarea.

Is this possbile with the ITK-library?

Thank you for your help guys.

[https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange_184x116-v1.png]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>        Virusvrij. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org>
http://public.kitware.com/mailman/listinfo/community


_______________________________________________
Community mailing list
Community at itk.org<mailto:Community at itk.org>
http://public.kitware.com/mailman/listinfo/community



[https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange_184x116-v1.png]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>        Virusvrij. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160810/d42e35c2/attachment-0001.html>


More information about the Community mailing list