# How can I calculate an area on a CT image. I can calculate volumes (mm^3) but not areas (mm^2)

Operating system:
Slicer version:
Expected behavior:
Actual behavior:

You can segment a single slice using Segment editor then compute surface using Segment statistics module. You need to divide the reported surface area value by 2, as surface of both sides of the segment are included in the reported number.

A single layer of the same dicom has different surface areas with different layers thickness (1mm,3mm,5mm), resulting in a large difference in surface area between the two.

In recent Slicer Preview Releases, you can draw curves and get their surface area (2D surface, as you would expect - only one side, no thickness).

Select “Closed Curve” from the “Create and place” toolbar button:

Left-click on the image to place curve control points and right-click to finish placement:

Measurements on curves are still work in progress, but you can open the Python console (Ctrl-3) and copy-paste the code below to see the surface area:

``````curves=slicer.util.getNodesByClass("vtkMRMLMarkupsClosedCurveNode")
for curve in curves:
surfaceAreaMm2 = slicer.modules.markups.logic().GetClosedCurveSurfaceArea(curve)
print("Curve {0}: surface area = {1:.2f} mm2".format(curve.GetName(), surfaceAreaMm2))
``````

thank you very much. I try it.

@lassoan
Would this calculation work with a closed curved drawn on a 3D model/segmentation?

It computes the area of the closed curve, even if the curve points are not coplanar because they were picked from a model surface. A soap-bubble-like surface is computed for 3D curves and surface of that is reported.

To see that surface, you can use this code snippet:

``````curve=slicer.util.getNodesByClass("vtkMRMLMarkupsClosedCurveNode")[0]
crossSectionSurface = vtk.vtkPolyData()
areaMm2 = slicer.modules.markups.logic().GetClosedCurveSurfaceArea(curve, crossSectionSurface)
crossSectionSurfaceModel.SetName("{0} surface".format(curve.GetName()))
crossSectionSurfaceModel.CreateDefaultDisplayNodes()
crossSectionSurfaceModel.GetDisplayNode().BackfaceCullingOff()
crossSectionSurfaceModel.GetDisplayNode().SetColor(curve.GetDisplayNode().GetColor())
crossSectionSurfaceModel.GetDisplayNode().SetOpacity(0.5)
crossSectionSurfaceModel.SetDescription("Area[mm2] = {0:.2f}".format(areaMm2))
print("Curve {0}: surface area = {1:.2f} mm2".format(curve.GetName(), areaMm2))
``````

Thanks Andras. This is awesome.

Sir… i need to calculate visceral and subcutaneous adipose tissue areas in abdominal ct scans…by adjusting HU between -30 to -190… my slicer is not showing those functions u r saying…pluz see this pic…pliz help

I hav been calculating in siemens ct consoles in our institute… it is easy in dat…using ROI function in volume tool…but need to do in laptop as covid is not allowing me access in console

You are using an old version. Install the latest preview and you will have the other markup types available to you.

@Sunilkumar_Leishangt - can you try the method described in this post? It would be great if you could compare it to results from the CT console and let us know how it goes.

New module for measuring cross-section area of segments

Thanx… i shall try n let u know…
Actually right now m on covid duty in PGIMER, Chandigarh, India… quarantined in a hotel…so the waifi is not good here…may b i shall take some time…thanks again.

Sir…can anyone help me on how to adjust HU

In the siemens console in my institute… i can adjust the HU in the right pannel from -30 to -120
Correlating adipose tissue… i just have to use the ROI to demarcate the region inside which i want to calculate the adipose tissue…and then click on evaluate button…it automatically colours and calculates the area of adipose tissue or those from -30 to -190 HU lying inside the area i marked with ROI…Dats it…simple…
But m puzzled with this

You are already familiar with the Siemens console and that software has also much less features, so of course you feel that 3D Slicer is not as simple to use. However, if you spend a little time with Slicer, too, then you’ll find how to do the same things and much more, without any difficulties.

For example, to get area of tissue within a specific HU range in a specified region, you can do the following steps:

• Go to Segment editor module
• Create new segment
• Click Threshold effect, set voxel range to -190 … -30, and click “Use for masking”
• Use any tools (Paint, Draw, Scissors, etc.) to define the region of interest (can be a single slice or you can segment many slices, to get cross-section areas in all those slices at once)
• Go to “Segment cross-section area” module to get cross-section areas as a plot and/or table

All these effects are shown blurred…i guess they r not installed…do i hav to download n install them…?

You need to select a master volume (if not selected automatically) and create a new segment (click “Add” button).

Can u pliz demonstrate how to calculate area of adipose tissues inside peritonium and that of subcutaneous adipose tissue outside peritonium…

I hav set threshold n drawn the outline but the line disappears soon after completion of drawing even if i press a or enter…
N i cant find “segment cross section area” anywhere…even in install extensions list…pliz help