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

Home » Public Forums » archive » Re: IImage Command Line
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
Re: IImage Command Line [message #50833] Mon, 16 October 2006 10:55 Go to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
StevenM wrote:
> I hope that someone can help me.
>
> I have a 3D array of data. I am trying to display this using iimage.
> When I use the command
> iimage, filename(*,*,30)
> I get the slice I want through the volume. But if I try to get the
> slice at another orientation i.e
> iimage, filename(30,*,*)
> I get an error message that says the first arguement is invalid.
>
> If I use the tvscl command I get images in both orientations with no
> problems but I would rather us iimage as I find further manipulations
> are easier.
>
> Thanks in advance
>
> Steven
>

try iimage, REFORM(filename[30,*,*])

If you put a number in the first position, you will have an aditional
dimension of size 1.

a = indgen(10,10,10)

DL> help, a[*,*,1]
<Expression> INT = Array[10, 10]
IDL> help, a[2,*,*]
<Expression> INT = Array[1, 10, 10]
IDL help, reform(a[2,*,*])
<Expression> INT = Array[10, 10]

Jean
Re: IImage Command Line [message #50834 is a reply to message #50833] Mon, 16 October 2006 11:01 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
StevenM wrote:
> I have a 3D array of data. I am trying to display this using iimage.
> When I use the command
> iimage, filename(*,*,30)
> I get the slice I want through the volume. But if I try to get the
> slice at another orientation i.e
> iimage, filename(30,*,*)
> I get an error message that says the first arguement is invalid.

Try:

iimage, reform(filename[30, *, *])

It's one of those quirks of IDL that

filename[*, *, 30]

is a m by n array, but

filename[30, *, *]

is a 1 by n by k array. iImage does not like a 1 by m by n array. The
REFORM above removes the extra dimension of size 1 (and can do other
dimension juggling tasks with more arguments).

Mike
--
www.michaelgalloy.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IImage Command Line
Next Topic: Re: Altered device coordinates after first call

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

Current Time: Tue Dec 02 06:36:58 PST 2025

Total time taken to generate the page: 0.64349 seconds