Re: 3D Matrix [message #32773] |
Mon, 11 November 2002 13:04  |
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  |
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
|
|
|