Login  Register

Re: "Unclean code" in FFT class

Posted by Robert Dougherty on Mar 16, 2006; 6:23pm
URL: http://imagej.273.s1.nabble.com/diameter-automatic-calculation-tp3703389p3703391.html

Jochim,

One way to deal with FHTs in ImageJ plugins is illustrated in FHT 3D.  My
solution was to hack some source code from ImageJ.  Not very OO, but
effective.  It does seem like it might be useful if FHT.rc2DFHT and
FHT.dfht3 were available as public static methods.

Bob

Robert P. Dougherty, Ph.D.
President, OptiNav, Inc.
Phone (425) 467-1118
Fax (425) 467-1119
www.optinav.com

 

> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Joachim Wesner
> Sent: Thursday, March 16, 2006 8:59 AM
> To: [hidden email]
> Subject: "Unclean code" in FFT class
>
> Hi there,
>
> I´m planning to write a ImageJ plugin for fringe processing (of
> interferometric data etc.) based on the so-called "spatial carrier phase
> measurement" method. As I´m pretty new to ImageJ and because the algorithm
> in one step requires a fully complex inverse FFT, I have been looking
> carefully at the existing FFT and FHT code (I will need to split that
> complex FFT in two appropritate FHTs).
>
> However, I am wondering about some strange issues in the FFT class:
>
> As I understand, this class is meant to be both a Plugin to be used for
> the
> current image(s) ("manually", or from a macro), but also exports some
> public methods for more general usage.
>
> I´m wondering why does doForewardTransform (and also the private
> doInverseTransform) require an FHT object AND an image processor object
> ip?
> Everything about the current image should already be available through he
> FHT object, or no?
>
> Even more, the argument ip seems not to be referenced at all in the code
> for both methods, but instead, IMHO incorrectly, a reference to a private
> Imageplus imp is used. This works as long as the class is only used as a
> plugin, but if you call the public method from another place, the old (if
> it even already exists?!) imp from the last "manual" call of the plugin
> will be referenced. Am I missing something here?
>
>
> BTW, ImageJ does not yet seem to have any plugin for (2-dimensional) phase
> unwrapping - OR? I could not find one, so I will add that too.
>
>
> Sincerely
>
> Joachim Wesner
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________