Re: SMOOTH function for 3D [message #46404] |
Tue, 22 November 2005 10:16 |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
IDLmastertobe wrote:
> Thanks, but I also tried doing result = SMOOTH(3Darray,[3,3,3]) and I
> observe no difference. any ideas?
I don't mean to be rude, but how could anyone possibly answer your
question given so little information? SMOOTH works fine on 3d data. I
can easily observe a difference in the data:
IDL> x=randomu(s,3,3,3)*10.
IDL> print, x
7.79008 4.15141 7.48622
1.69548 6.31630 6.84862
7.00782 2.78159 7.85362
5.91996 0.659594 5.77286
8.38353 3.33698 9.03057
7.64424 0.474168 5.77164
3.62966 8.94523 4.11056
9.33464 1.19968 4.66864
5.79112 3.83709 1.43494
IDL> print, smooth(x,3,/edge)
5.31274 5.66250 6.01227
5.21623 5.58725 5.95827
5.11973 5.51200 5.90428
5.42783 5.47206 5.51628
5.41093 5.25468 5.09842
5.39403 5.03729 4.68056
5.54293 5.28162 5.02030
5.60563 4.92210 4.23857
5.66832 4.56258 3.45685
You could do something similar with your data to convince yourself that
SMOOTH is working. Then you would know that your problem lies elsewhere
and you could start looking for other possibilities.
-Rick
|
|
|
|
Re: SMOOTH function for 3D [message #46423 is a reply to message #46418] |
Mon, 21 November 2005 23:46  |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
IDLmastertobe wrote:
> Hi, i'm working on smoothing 3D data. I can visualize a 3D object base on
> the data and rotate it . I have used SMOOTH function before to smooth 2D
> image and it worked fine. But now when I am using it for 3D as: result =
> SMOOTH(3Darray); and then use the result as my new 3D data, I observe no
> difference when I am visualizing it. It looked just like the original
> unsmoothed function. Does anyone know why? Thank you.
>
The syntax result =SMOOTH(3Darray) is wrong since a second argument is
required which indicates the smoothing width (scalar or vector). For smoothing
a 3D array in each direction the proper call would be, e.g.
result=SMOOTH(3Darray, [2,4,3])
which smoothes the data in the x-direction over two pixels, in y-direction over 4,
and in z-direction over 3 pixels.
regards,
Bringfried Stecklum
|
|
|
Re: SMOOTH function for 3D [message #46431 is a reply to message #46423] |
Mon, 21 November 2005 10:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
IDLmastertobe writes:
> Hi, i'm working on smoothing 3D data. I can visualize a 3D object base on
> the data and rotate it . I have used SMOOTH function before to smooth 2D
> image and it worked fine. But now when I am using it for 3D as: result =
> SMOOTH(3Darray); and then use the result as my new 3D data, I observe no
> difference when I am visualizing it. It looked just like the original
> unsmoothed function. Does anyone know why?
No, I don't know why. Lousy visualization method would be
my first guess. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|