Home
gbook.org
Building ImageMagick with FFT support PDF Print E-mail
Written by Administrator   
Monday, 25 July 2011 15:32

I recently needed the fft functionality available with ImageMagick but the command convert image.png -fft failed. Turns out you need to build ImageMagick against the FFTW library, but its not terribly easy to figure out how to do this. The advanced unix compilation for ImageMagick page doesn't describe specifically how to do this. The fPIC and fft flags described below are very important to get this to build correctly

Here's a quick outline of how to build ImageMagick to use the fft functions:

1) Download the FFTW source code

a) unzip the fftw3 source, cd into the fftw3 source directory

b) ./configure CXXFLAGS=-fPIC CFLAGS=-fPIC

c) make

d) sudo make install

2) Download the ImageMagick source

a) unzip the ImageMagick source and cd into the source directory

b) ./configure --enable-hdri -with-fftw

c) make

d) sudo make install

 

Then convert image.png -fft should work!

 

----->  

 
2002 Toyota Camry repairs PDF Print E-mail
Written by Administrator   
Saturday, 16 July 2011 16:16

I bought my 2002 Toyota Camry in September 2003, with 30,000 miles on it. It's actually been a fantastic car for past 8 years. But as time goes on, it shows its age. This summer I decided to pay attention to it when there was a problem I couldn't ignore. There was a loud noise coming from under the engine when the car was running... definitely had that rumbling exhaust leak sound. I took it to a local garage and they quoted $750 to replace the flex pipe/catalytic converter. The part itself was $550. I looked online and found the pipe on Amazon.com for $180. I thought, hey what a savings if I do it myself! After all I worked in a garage for the summer of 1997.

 

Last Updated on Tuesday, 26 July 2011 19:33
Read more...
 
How to submit Matlab batch jobs to Sun Grid Engine PDF Print E-mail
Written by Administrator   
Thursday, 10 March 2011 18:03

When we started porting our automatic fMRI processing to the cluster at work, it took a large amount of time to figure out exactly how to get Matlab, and SPM to run in batch mode on the cluster. So many variables and so many steps... so many places things could go wrong. In this article I describe the steps necessary to run Matlab batch jobs through SGE and cron.

Last Updated on Thursday, 10 March 2011 20:15
Read more...
 
Perl parameter passing PDF Print E-mail
Written by Administrator   
Friday, 15 July 2011 13:26

Here's an interesting thing I should have learned a long time ago: when you pass an array to a subroutine in Perl, it passes the elements of the array, not a pointer to the array.

One might assume that this function call would pass the array in as an array... but it actually causes all subsequent function parameters to become part of the array once it is passed in:

my @array = (1,2,3);
ArrayFunction(@array, 1, "hello");
sub ArrayFunction() {
my (@array, $num, $str) = @_;
print @array;
}

This would actually print out

1,2,3,1,"hello"

... and the variables $num and $str would be empty. Not what you're expecting to see! Unless you're expecting it

 

To properly pass an array into a function and use it as an array, you would need to pass the parameters by reference and call the function like this

ArrayFunction(\@array, 1, "hello");

... and declare the function like this:

 

sub ArrayFunction() {
my ($array, $num, $str) = @_;
my @array = @{$array};
print @array;
}
This will print out 1,2,3 the way you'd expect
If you're last function parameter is always an array, or your only parameter is an array, you may never notice this behavior.

 

 
Master's degree finished! PDF Print E-mail
Written by Administrator   
Thursday, 16 December 2010 23:02

I successfully defended my thesis "Modeling of Aortic Valve Anatomic Geometry from Clinical Multi Detector-Row Computed Tomography Images" yesterday, which completes my Master's degree in biomedical engineering at UConn.

Thesis can be viewed here.

Thesis defense can be viewed here.

UPDATE (2/22/2011): Still waiting for degree conferral. Apparently the process of receiving a graduate degree from UConn is a little slower than for an undergraduate degree. The graduate school is predicting conferral in late March/early April for the December 2010 students.

Last Updated on Thursday, 10 March 2011 20:16
Read more...
 
«StartPrev1234NextEnd»

Page 1 of 4
Copyright © 2014 gbook.org. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
 

Who's Online

We have 3 guests online

Advertisement

Featured Links: