use of ij.process.FloatProcessor in project GDSC-SMLM by aherbert.
the class IJImagePeakResultsTest method canAddToSinglePixels.
@Test
public void canAddToSinglePixels() {
IJImagePeakResults r = new IJImagePeakResults(title, bounds, 1);
FloatProcessor fp = new FloatProcessor(bounds.width, bounds.height);
begin(r);
add(fp, r, 1, 1, 1);
add(fp, r, 1, 2, 4);
add(fp, r, 0, 1, 2);
r.end();
float[] expecteds = getImage(fp);
float[] actuals = getImage(r);
Assert.assertArrayEquals(expecteds, actuals, 0);
}
use of ij.process.FloatProcessor in project GDSC-SMLM by aherbert.
the class IJImagePeakResultsTest method noInterpolateDownInXAtImageEdge.
@Test
public void noInterpolateDownInXAtImageEdge() {
IJImagePeakResults r = new IJImagePeakResults(title, bounds, 1);
r.setDisplayFlags(IJImagePeakResults.DISPLAY_WEIGHTED);
FloatProcessor fp = new FloatProcessor(bounds.width, bounds.height);
begin(r);
addValue(r, 0.5f, 1.5f, 2);
fp.putPixelValue(0, 1, 2);
r.end();
float[] expecteds = getImage(fp);
float[] actuals = getImage(r);
Assert.assertArrayEquals(expecteds, actuals, 0);
}
use of ij.process.FloatProcessor in project GDSC-SMLM by aherbert.
the class IJImagePeakResultsTest method canInterpolateDownInY.
@Test
public void canInterpolateDownInY() {
IJImagePeakResults r = new IJImagePeakResults(title, bounds, 1);
r.setDisplayFlags(IJImagePeakResults.DISPLAY_WEIGHTED);
FloatProcessor fp = new FloatProcessor(bounds.width, bounds.height);
begin(r);
addValue(r, 1.5f, 1.25f, 2);
fp.putPixelValue(1, 0, 0.5f);
fp.putPixelValue(1, 1, 1.5f);
r.end();
float[] expecteds = getImage(fp);
float[] actuals = getImage(r);
Assert.assertArrayEquals(expecteds, actuals, 0);
}
use of ij.process.FloatProcessor in project GDSC-SMLM by aherbert.
the class IJImagePeakResultsTest method canInterpolateUpInXAtPixelEdge.
@Test
public void canInterpolateUpInXAtPixelEdge() {
IJImagePeakResults r = new IJImagePeakResults(title, bounds, 1);
r.setDisplayFlags(IJImagePeakResults.DISPLAY_WEIGHTED);
FloatProcessor fp = new FloatProcessor(bounds.width, bounds.height);
begin(r);
addValue(r, 2f, 1.5f, 2);
fp.putPixelValue(1, 1, 1);
fp.putPixelValue(2, 1, 1);
r.end();
float[] expecteds = getImage(fp);
float[] actuals = getImage(r);
Assert.assertArrayEquals(expecteds, actuals, 0);
}
use of ij.process.FloatProcessor in project GDSC-SMLM by aherbert.
the class IJImagePeakResultsTest method canInterpolateDownInXAtPixelEdge.
@Test
public void canInterpolateDownInXAtPixelEdge() {
IJImagePeakResults r = new IJImagePeakResults(title, bounds, 1);
r.setDisplayFlags(IJImagePeakResults.DISPLAY_WEIGHTED);
FloatProcessor fp = new FloatProcessor(bounds.width, bounds.height);
begin(r);
addValue(r, 1f, 1.5f, 2);
fp.putPixelValue(0, 1, 1);
fp.putPixelValue(1, 1, 1);
r.end();
float[] expecteds = getImage(fp);
float[] actuals = getImage(r);
Assert.assertArrayEquals(expecteds, actuals, 0);
}
Aggregations