]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 14 Nov 2009 02:52:06 +0000 (02:52 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 14 Nov 2009 02:52:06 +0000 (02:52 +0000)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index 112321dd572d8a429de5e43cc84dbf8e182d1a11..f61ef476dfa1534960c2c7c7bb6cc1206896f21a 100644 (file)
@@ -1025,6 +1025,29 @@ void Magick::Image::flop ( void )
   (void) DestroyExceptionInfo( &exceptionInfo );
 }
 
+// Implements the discrete Fourier transform (DFT) of the image either as a
+// magnitude / phase or real / imaginary image pair.
+void Magick::Image::forwardFourierTransform ( void )
+{
+  ExceptionInfo exceptionInfo;
+  GetExceptionInfo( &exceptionInfo );
+  MagickCore::Image* newImage = ForwardFourierTransformImage ( image(),
+    MagickTrue, &exceptionInfo );
+  replaceImage( newImage );
+  throwException( exceptionInfo );
+  (void) DestroyExceptionInfo( &exceptionInfo );
+}
+void Magick::Image::forwardFourierTransform ( const bool magnitude )
+{
+  ExceptionInfo exceptionInfo;
+  GetExceptionInfo( &exceptionInfo );
+  MagickCore::Image* newImage = ForwardFourierTransformImage ( image(),
+    magnitude == true ? MagickTrue : MagickFalse, &exceptionInfo );
+  replaceImage( newImage );
+  throwException( exceptionInfo );
+  (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
 // Frame image
 void Magick::Image::frame ( const Geometry &geometry_ )
 {
index 26f3006de8c9bba972b34b05b54a06f22a4ac00a..9b4f0855bfebe865554a075b49f7f2aa943a979b 100644 (file)
@@ -352,6 +352,11 @@ namespace Magick
     // Flop image (reflect each scanline in the horizontal direction)
     void            flop ( void );
     
+    // Implements the discrete Fourier transform (DFT) of the image either as a
+    // magnitude / phase or real / imaginary image pair.
+    void            forwardFourierTransform ( void );
+    void            forwardFourierTransform ( const bool magnitude );
+    
     // Frame image
     void            frame ( const Geometry &geometry_ = frameGeometryDefault );
     void            frame ( const unsigned int width_,