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

Home » Public Forums » archive » Slicing a volume
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Slicing a volume [message #36903] Tue, 04 November 2003 08:52
Nuno Oliveira is currently offline  Nuno Oliveira
Messages: 75
Registered: October 2003
Member
Since I began to work with IDL one of the things that makes confuse is when
I want to make a two-dimension array from a three-dimension array (and I
often do).



For example I can create de three-dimension array vol



vol=INTARR(100,100,100)



But when I try to extract slices along different axes I get "different"
variables.



sliceX=vol(50,*,*)

sliceY=vol(*,50,*)

sliceZ=vol(*,*,50)



Then, I see that sliceX is an array [1,100,100], and the same with sliceY
but, sliceZ is an array [100,100]. sliceX and sliceY are what I am tempted
to call a false 3D array because one of the dimensions can have only one
value. My question is why they are not equal: all 2D arrays or all 3D
arrays?



I know this not very important, just bores me that I need to make a specific
code for the Z direction. I can use the function EXTRACT_SLICE, but it
really makes me sad that it doesn't work the easy way. Anyone knows why? Am
I making any mistake? Anyone had some time the same problem? Is the
EXTRACT_SLICE the only solution?



Cordially,



Nuno.
[Message index]
 
Read Message
Previous Topic: Dot above letter eg. Mdot in IDL
Next Topic: call_external fortran with OS X...what compiler for f95?

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

Current Time: Thu Oct 09 11:43:23 PDT 2025

Total time taken to generate the page: 0.40389 seconds