Skip to content

Commit

Permalink
corrected typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ammendes committed Sep 13, 2024
1 parent f474445 commit 1357ae4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/java/BlockRedundancy2D_.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public void run(String s) {
int localWorkSize = min(chosenDevice.getMaxWorkGroupSize(), 256);
int globalWorkSize = roundUp(localWorkSize, elementCount);

IJ.log("Calculating redundancy...");
IJ.log("Calculating block repetition...");


// ------------------------------- //
Expand Down Expand Up @@ -799,7 +799,7 @@ public void run(String s) {
// ------------------------- //

FloatProcessor fp1 = new FloatProcessor(w, h, repetitionMap);
ImagePlus imp1 = new ImagePlus("Block Redundancy Map", fp1);
ImagePlus imp1 = new ImagePlus("Block Repetition Map", fp1);

// Apply SReD LUT
InputStream lutStream = getClass().getResourceAsStream("/luts/sred-jet.lut");
Expand Down
32 changes: 30 additions & 2 deletions src/main/java/GlobalRedundancy.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
import ij.IJ;
import ij.ImagePlus;
import ij.measure.UserFunction;
import ij.plugin.LutLoader;
import ij.process.FloatProcessor;
import ij.process.ImageProcessor;
import ij.process.LUT;

import java.awt.image.IndexColorModel;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -382,7 +385,7 @@ public void run(){
int yWorkSize = min(64, h - nYB * 64);
for (int nXB = 0; nXB < nXBlocks; nXB++) {
int xWorkSize = min(64, w - nXB * 64);
showStatus("Calculating redundancy... blockX=" + nXB + "/" + nXBlocks + " blockY=" + nYB + "/" + nYBlocks);
showStatus("Calculating global repetition... blockX=" + nXB + "/" + nXBlocks + " blockY=" + nYB + "/" + nYBlocks);
queue.put2DRangeKernel(kernelGetDiffStdMap, nXB * 64, nYB * 64, xWorkSize, yWorkSize, 0, 0);
queue.finish();
}
Expand Down Expand Up @@ -495,7 +498,32 @@ public void run(){

IJ.log("Preparing results for display...");

ImagePlus imp1 = new ImagePlus("Redundancy Map - Level "+level, fpFinal);
ImagePlus imp1 = new ImagePlus("Repetition Map - Level "+level, fpFinal);

// Apply SReD LUT
InputStream lutStream = getClass().getResourceAsStream("/luts/sred-jet.lut");
if (lutStream == null) {
IJ.error("Could not load SReD LUT. Using default LUT.");
}else{
try {
// Load LUT file
IndexColorModel icm = LutLoader.open(lutStream);
byte[] r = new byte[256];
byte[] g = new byte[256];
byte[] b = new byte[256];
icm.getReds(r);
icm.getGreens(g);
icm.getBlues(b);
LUT lut = new LUT(8, 256, r, g, b);

// Apply LUT to image
imp1.getProcessor().setLut(lut);
//imp1.updateAndDraw();
} catch (IOException e) {
IJ.error("Could not load SReD LUT");
}
}

imp1.show();

/*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/VarianceStabilisingTransform2D_.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void run(String s) {
NonBlockingGenericDialog gd = new NonBlockingGenericDialog("Calculate VST...");
gd.addNumericField("Gain guess:", 0);
gd.addNumericField("Offset guess:", 0);
gd.addNumericField("Noise standard-deviation guess:", 100);
gd.addNumericField("Noise standard deviation guess:", 100);
gd.addCheckbox("Estimate offset and StdDev from ROI?", false);
gd.showDialog();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/VarianceStabilisingTransform3D_.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void run(String s) {
NonBlockingGenericDialog gd = new NonBlockingGenericDialog("Calculate VST...");
gd.addNumericField("Gain guess:", 0);
gd.addNumericField("Offset guess:", 0);
gd.addNumericField("Noise standard-deviation guess:", 100);
gd.addNumericField("Noise standard deviation guess:", 100);
gd.addCheckbox("Estimate offset and StdDev from ROI?", false);
gd.showDialog();

Expand Down

0 comments on commit 1357ae4

Please sign in to comment.