help - cgimage revise x and y positions [message #92561] |
Wed, 13 January 2016 09:30  |
dmfl0590
Messages: 17 Registered: December 2015
|
Junior Member |
|
|
Hi
I have a 3D image with the following dimensions Im=[136,136,160]=[x,y,z].
I wanted to display only one pixel from x-direction i.e. Im2=[40,136,160].
I used the cgimage like this:
Im2 = reform(Im2[40,*,*])
cgdisplay, 200,200
cgimage, Im2
The image displayed is 2D. The x-direction was y-direction and y-direction the z-direction in 3D case.
Is it possible to revise the x- with y-direction when I display the image? OR in 3D sense the y- with z-direction.
Can anyone help with this?
Thanks
|
|
|
Re: help - cgimage revise x and y positions [message #92562 is a reply to message #92561] |
Wed, 13 January 2016 10:14   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
You probably want the TRANSPOSE() function
IDL> im = bytarr(30,24,88)
IDL> im = transpose(im,[1,0,2]) Switch first and second dimensions
IDL> help,im
IM BYTE = Array[24, 30, 88]
--Wayne
On Wednesday, January 13, 2016 at 12:30:11 PM UTC-5, dmfl...@gmail.com wrote:
> Hi
>
> I have a 3D image with the following dimensions Im=[136,136,160]=[x,y,z].
>
> I wanted to display only one pixel from x-direction i.e. Im2=[40,136,160].
>
> I used the cgimage like this:
>
> Im2 = reform(Im2[40,*,*])
>
> cgdisplay, 200,200
> cgimage, Im2
>
> The image displayed is 2D. The x-direction was y-direction and y-direction the z-direction in 3D case.
>
> Is it possible to revise the x- with y-direction when I display the image? OR in 3D sense the y- with z-direction.
>
> Can anyone help with this?
>
> Thanks
|
|
|
|