This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The last couple of years I have been working on a library for manipulating numeric data in generic ways | |
(see Zorbage: github.com/bdezonia/zorbage). The key approach is to define generic algorithms that can | |
work with lots of different data types. This work has been based on ideas I've been thinking about for | |
years and was improved by reading books by Stepanov ("Elements of Programming" and "From Mathematics to | |
Generic Programming"). | |
Recently I've been thinking about saving and loading generic data types in a portable fashion. I began | |
toying with these ideas in a file format specification I have begun (see BSF: github.com/bdezonia/bsf). | |
It occurs to me that a multidimensional file reader and writer could be something provided at the OS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hopefully this will be of some use to people supporting old rails versions. | |
I tried porting a rails 2.3 application that had been on ruby 1.8.7 to ruby 1.9.3. | |
After doing so I could not get my rspec 1.3 tests to run successfully (in my | |
controllers). I always got stack level too deep errors dealing with a NoMethodError. | |
I could see that an Array#flatten! call was the culprit. | |
I understood from this post | |
(http://yehudakatz.com/2010/01/02/the-craziest-fing-bug-ive-ever-seen/) that somewhere | |
in the Rails 1.9 development the way method_missing was handled was changed somewhat. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calibration { | |
private static double m = 0.235; | |
private static double b = 0.33; | |
private static double calibrated(double rawValue) { | |
return m * rawValue + b; | |
} | |
private static double scale(double raw1, double raw2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void testPointSetsAndFunctions() { | |
final Img< FloatType > imgA = ArrayImgs.floats( 5000, 5000 ); | |
final Img< FloatType > imgB = ArrayImgs.floats( 5000, 5000 ); | |
final Img< FloatType > imgC = ArrayImgs.floats( 5000, 5000 ); | |
int i = 0; | |
for ( final FloatType t : imgA ) | |
t.set( i++ ); | |
i = 0; | |
for ( final FloatType t : imgB ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import java.lang.reflect.Array; | |
/* | |
* Toy example | |
* | |
* Want to be able to have | |
* regions (regions of interest) | |
* iterable regions | |
* coordinates of type int[], double[], long[], etc. | |
* we should be able to treat any iterable region as a region of interest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package imagej.core.plugins.display; | |
import java.util.List; | |
import imagej.ImageJ; | |
import imagej.data.Dataset; | |
import imagej.data.display.ImageDisplay; | |
import imagej.display.Display; | |
import imagej.display.DisplayService; | |
import imagej.ext.plugin.Menu; |