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
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
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).
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.
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.