comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » help - cgimage revise x and y positions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
help - cgimage revise x and y positions [message #92561] Wed, 13 January 2016 09:30 Go to next message
dmfl0590 is currently offline  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 Go to previous messageGo to next message
wlandsman is currently offline  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
Re: help - cgimage revise x and y positions [message #92563 is a reply to message #92562] Wed, 13 January 2016 10:19 Go to previous message
dmfl0590 is currently offline  dmfl0590
Messages: 17
Registered: December 2015
Junior Member
Yes that's what I want. Thank you :)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: help - speeding up a loop
Next Topic: PyQT widgets?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:53:52 PDT 2025

Total time taken to generate the page: 0.00476 seconds