PixelMath allows this:
Step 1:
pixel($T,xpos(),height($T)/2)
takes a line defined by height($T)/2)
this half height expression can also be replaced by any number with a valid line number value in the y axis of your image. (So, if the Image ist 500 lines high
you can use any number between 1 and 500)
Step 2:
iif(abs((1-$T)*height($T)) > ypos(), 0,$T)
Displays the profile according to the brightness of the pixels in the pixel line from step 1
Copy the Expression of Step 1 into the PixelMath process, drag the triangle over the Image
and this changes your Image to have all lines the same Pixels as the selected line.
Copy the Expression of Step 2 into the PixelMath process, drag the triangle over the Image
in this changes your Image to plot a Profile according to the brightness of each Pixel.
Gerald