itk::LabelGeometryImageFilter GetMajorAxisLength() return type

I am using itk::LabelGeometryImageFilter to GetMajorAxisLength() of an object. I want to know the return unit of length given, is it in millimeter or pixel? If it is in pixel how to convert it into millimeter?

Thanks in advance :slight_smile:

Hello @anillspawar,

The measurement is always in metric units. For many use cases this is mm.

ITK is not aware of the unit associated with the image spacing. If the unit is something other than mm then that is the unit of your length (for microscopy images this will more commonly be nm and not mm).

1 Like

A little off topic, but in case it helps … if the image is organic tissue (with hundreds to thousands of cells) then the resolution is typically expressed in microns rather than mm or nm. In this case, if the image is labeled as β€œ10x” magnification then that is approximately 1 micron per pixel. If it is labeled as β€œ20x” magnification then that is approximately 0.5 microns per pixel, and so on.

1 Like

Thanks @zivy for quick answer.
I am using CT images and pixel spacing is in mm, so you are saying measured lengths using itk::LabelGeometryImageFilter will be in mm only and there is no need to multiply with pixel spacing additionally?

Hello @anillspawar,

Yes, that is correct, the measurement will be in mm and you don’t need to multiply by the pixel spacing.