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

Home » Public Forums » archive » Re: 3D Matrix
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: 3D Matrix [message #32773] Mon, 11 November 2002 13:04 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pushya (pushyar@yahoo.com) writes:

> In order to perform 3D dilation, i need to create a 3D structuring
> element. Can anybody tell me how i can create a 3D matrix.
> I have a 2D matrix as
> Str_Elem = [[1,1,1],[1,1,1],[1,1,1]]
> I want to extend it to 3D. Please help me with this.

Try this:

str_elem = Replicate(1, 3, 3, 3)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: 3D Matrix [message #32866 is a reply to message #32773] Tue, 12 November 2002 10:35 Go to previous message
pushyar is currently offline  pushyar
Messages: 9
Registered: October 2002
Junior Member
I think that will create a 3D matrix with all 'ones'. The structuring
element i need will look like this.
Str_Elem1 = [[0,0,0],[0,1,0],[0,0,0]]
Str_Elem2 = [[0,1,0],[1,1,1],[0,1,0]]
Str_Elem3 = [[0,0,0],[0,1,0],[0,0,0]]

Replicate cannot create this. Please tell me if there's any way to
create a 3D matrix like that.

Thanks,
Pushya.

David Fanning <david@dfanning.com> wrote in message news:<MPG.1839c95c283394ad989a12@news.frii.com>...
> Pushya (pushyar@yahoo.com) writes:
>
>> In order to perform 3D dilation, i need to create a 3D structuring
>> element. Can anybody tell me how i can create a 3D matrix.
>> I have a 2D matrix as
>> Str_Elem = [[1,1,1],[1,1,1],[1,1,1]]
>> I want to extend it to 3D. Please help me with this.
>
> Try this:
>
> str_elem = Replicate(1, 3, 3, 3)
>
> Cheers,
>
> David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: PRINT on same line
Next Topic: 3D Matrix

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

Current Time: Wed Oct 08 14:00:30 PDT 2025

Total time taken to generate the page: 0.00504 seconds