Adding lines to 3d image display

56 views
Skip to first unread message

Jacob Ricci

unread,
Aug 5, 2016, 2:30:48 PM8/5/16
to pyqtgraph

Hello,
I am new to pyqtgraph and python in general and i was wondering if you could help me out a bit. I have an array of dicom images that I am able to display using pyqtgraph.image(array) where 'array' contains my data and i am able to scroll through them using the slider. However, i am wondering if there is a way that I can draw a line through these images between two arbitrary points. For example, in the data i am working with currently I have two 3d points: (258,461,52) and (258,0,52). In this case, it would be a vertical line at x=258 and at the 52 slice in the image set. Is there a way to plot this line within the window that displays with the original pyqtgraph.image(array) command? Also, it is not guaranteed that this line will stay within the same image slice or be vertical/horizontal as it depends on arbitrary angles in the xy and yz plane. I have tried using the GLLinePlotItem but it is giving me trouble as im getting errors concerning my pos argument. I expect that this comes for not being well enough versed in python and not understanding the arguments. Any help would be greatly appreciated. I am sorry if this is too vague I can explain further if necessary.
Jake

Jacob Ricci

unread,
Aug 8, 2016, 8:04:08 AM8/8/16
to pyqtgraph
so i spent the weekend looking through somethings and it seems that i need to use a version of the affine slice function. however, in analyzing the code for this function i am having a hard time determining which lines correspond to the size of the array that is returned. Ideally, i would want a 1D array of coordinates that the line passes through. any help is appreciated.
Jake
Reply all
Reply to author
Forward
0 new messages