| Re: IImage Command Line [message #50833] |
Mon, 16 October 2006 10:55  |
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  |
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
|
|
|
|