I would like to calculate the intensity profile along a line. My data has a resolution of 2 mm in the cranio-caudal direction and I don’t want to interpolate any value along the line.
Currently, I’m using the LineIntensityProfile module from SandBox extension, but it requires the resolution line parameter. Any idea how to compute the line intensity profile without changing the resolution?
If you want to extract a line along one of the 3 image axes then you can do that by getting the volume as a numpy array and use array indexing. You can find examples for each step in the script repository.
If the line is not exactly parallel with an image axis and you want to get samples at equal distances then you must resample (at any chosen resolution).