From 3b64c8774c4f58a933ea16125675d4d3f402c732 Mon Sep 17 00:00:00 2001 From: josemartin117 Date: Sun, 17 Oct 2021 23:25:32 -0500 Subject: [PATCH] Added SRM --- build/classes/SRM.class | Bin 0 -> 234 bytes build/classes/filtro_chido/Filtrado$1.class | Bin 769 -> 769 bytes build/classes/filtro_chido/Filtrado$2.class | Bin 769 -> 769 bytes build/classes/filtro_chido/Filtrado$3.class | Bin 541 -> 769 bytes build/classes/filtro_chido/Filtrado$4.class | Bin 0 -> 541 bytes build/classes/filtro_chido/Filtrado.class | Bin 7653 -> 8163 bytes build/classes/filtro_chido/Filtrado.form | 11 + build/classes/filtro_chido/Filtro_Chido.class | Bin 515 -> 515 bytes build/classes/filtro_chido/SRM.class | Bin 0 -> 8749 bytes src/filtro_chido/Filtrado.form | 11 + src/filtro_chido/Filtrado.java | 24 +- src/filtro_chido/Filtro_Chido.java | 1 + src/filtro_chido/SRM.java | 378 ++++++++++++++++++ 13 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 build/classes/SRM.class create mode 100644 build/classes/filtro_chido/Filtrado$4.class create mode 100644 build/classes/filtro_chido/SRM.class create mode 100644 src/filtro_chido/SRM.java diff --git a/build/classes/SRM.class b/build/classes/SRM.class new file mode 100644 index 0000000000000000000000000000000000000000..582fad5f3b7c4db08343a83805e974735fa094b5 GIT binary patch literal 234 zcmXYr%?`mp6ot>N{!pcjH?YG(H+IBEVpSxF{j?@bQ*BbM_p*{$cmNM2?ueP>WWF!w z-pu>+d;ypsaM3`=LDzv#uxBb))tt~63=afzQ5+?~k5n$#^(B_&Uc?!jUQ{F^JBU(g z{!6nut1H2ZcH7mI;O>gLOypAOfhN0gDsIAq35)kL69R3*Oys9<6Q?q%(1*eQ(TDhQ jmD6Sle+*co2k6eifWv9C2HI$HdcU`Y7F;G`t6Sa|pp+<@ literal 0 HcmV?d00001 diff --git a/build/classes/filtro_chido/Filtrado$1.class b/build/classes/filtro_chido/Filtrado$1.class index 704bfec44a2f2ffb3dbaf349cfea5c5567ec8f75..a65c09223f5a69c90a8a7e233ce31dce16ff2223 100644 GIT binary patch delta 23 ecmZoF{$i(PBxroV&HIRXWA!zbJCIF{$i(P3xroV&HGqMGA#n0RCIF{$ix^qxroV&HJX8gA!hPHCIF{$ix^ixroV&HHv|QA$sybCI!@7sN9ySE7R3lwR zI|9qekvPje2!D9;)J<9OjHH zCN`D%Ko;8h(_qV`6$oD#ql$hm%Tm!@nav;VQbk*)mA2-MDvoS1R++#?H#w0L8Ou*q ztR~7-@j(qaboQRp)Krs7VC^!PK=9U{7O7&v6g&T~?njQASr1K`+ftk3m#P}s%)@4g zd$=FM!_^SJvmPK~`(}18+7;;3B6Deu%i~y+;Cfxl3|T?LxC9~9wc$Wu)(HKRX%)_YQKDw-ls`Bb*<#I=UjT#ZVJI|YMoH2 zU7k$kvu?+_)?vLNM0d?@!`|76xpq-+uuD$+389wt^yrJaMamLIQOxa(kmnz{s53J| z{~e=XCJsu>=_bto-9FH?%xK>5&PVvc3&Aub`vw?O9AbwsrfCurwNsJewiAmK&OcV8BmUe|DWt+6c|K&vzP5c2G z{Yl0tpm^ZWnR)YO-@cu`f4{r|Xkgbs8U-Ci0|^x3P|~rkqpV|tA$=s3jE)(S)tb$q zwR~4FiMpTO>CK1z#>Co zuCj@3>@bw(l9dL-a;#kUxa!s~JAL6q^qyJkYN*uYk=lSuvRAC$Su?sF1>~g}Z^sBl zWXn*FH=v$qV+Q9wCejcnIr9~Xn-P-QGqjmT{1bssWbpM*$DHaUu|jMDd8|^_s9M7kRR$@hD3i$_)zEDL literal 0 HcmV?d00001 diff --git a/build/classes/filtro_chido/Filtrado.class b/build/classes/filtro_chido/Filtrado.class index 2117ea4d7f20e4c4c9659fefaa941034ba060e50..0f6ec5630a90ba96f56147aadd6907341a435718 100644 GIT binary patch delta 3766 zcma)9dwdkt75>glc4u~&gv~}s0>nH-9(fP~;h6-I011R7M8Ye)!jeD|2ua8bP;?Yf zKv97eDk>sqrM6HdF_TCr2!dF!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4DXUm!{vT^4jLW5paDvElJJo*&Iq7iwFXQ2uC zXy);)%yJs#{N-BBxX$A3v;i$Vx9!-Amz;^4%G21Bzi%JJ!<@)i`0)sDNMZs(dl{8G z=ut)+9JG%S&ms2XF_w?>GXUNW_;fr$l=KPQxjGJ%=m_!id43N1xp4f60kWJ`F`MH^ zCHY`q!gH{+FpY?8ESn#xZ1{qHg)ire9P(1P3I{qX?1hidi>E<;FAniC3NN@xOf1x% z)U+0;2w!-mL|NU4JUHxJ^z4i;%4%bxFWs8xzm{Co|Ki~Uj&KSJU&eBl1)S(2mhyR$ xHO>LxGcWwx&7al}u|qo&D3~3`ALa=Z3!-?I2`=KV^#n@hcYBLQQ$}{&e*lc}!V3TZ diff --git a/build/classes/filtro_chido/Filtrado.form b/build/classes/filtro_chido/Filtrado.form index add86a5..26e16f9 100644 --- a/build/classes/filtro_chido/Filtrado.form +++ b/build/classes/filtro_chido/Filtrado.form @@ -64,6 +64,7 @@ + @@ -83,6 +84,8 @@ + + @@ -172,6 +175,14 @@ + + + + + + + + diff --git a/build/classes/filtro_chido/Filtro_Chido.class b/build/classes/filtro_chido/Filtro_Chido.class index 95678ac8f70a6a7c5dce44dc08d68cb1ff052441..07850717b18dc306c7692904459a0a48038f5ca5 100644 GIT binary patch delta 13 UcmZo>X=d4Qhmlcu@?AzX03S32M*si- delta 13 UcmZo>X=d4Qhmlce@?AzX03R;|MgRZ+ diff --git a/build/classes/filtro_chido/SRM.class b/build/classes/filtro_chido/SRM.class new file mode 100644 index 0000000000000000000000000000000000000000..8a9d73d587e0bcd968ababbf4ba54646d68f25f4 GIT binary patch literal 8749 zcmb7J31F1vnSQ>Rf9C&Z@`qz!fN>@m6eLV8E(Zt@A;Dl22oOX8k4!Q{GGUm($wcs| zRhz}_YPYbmD&mRMblbYtt^`)RcDqHZuB%q9ZFkqUZtrflrxgljpZEJGlOSk!#rf{z zJ)ZaY{=D?zQ_ljJs~Y^c0?!$ZHv>L|@w~D0MW^*o(*0)>U-x4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L*gTJ}>2bRt&cp1EdsD`1_V17Js4N@ROJ(r8!DeyRxL$k#$r%zz6Yl+;*PpSo( zPAfQ*HuqwA2(M#eahcSSn)EI1RTkn8 z<6Vf)sLQd7Z#}Wii^$}3x*d_Vhw`1HW$oo>vTiMF+9%U^2?K5sMp4$MXEGx7d9WO* zhbU&oxxzzE#C{1!Tq8!bBL&P=CCjvt$? zzb;+D^#4k}(67RHbv0tD0}J^cZ&XQKtTq#~DgF_xn_mpJ(D`rGvXpEZeE2vY6Qw0m z6-&%&sk)ekY+|MI`M`aO4N|QQr!;sDb=EF^5qc@da@u|T|>Lbp;YzIDDyPP?PM-TgWRE+ okdK)L6Jb%gm{)y)9T(HxF3pZ8+J + @@ -83,6 +84,8 @@ + + @@ -172,6 +175,14 @@ + + + + + + + + diff --git a/src/filtro_chido/Filtrado.java b/src/filtro_chido/Filtrado.java index 87289f7..c10a626 100644 --- a/src/filtro_chido/Filtrado.java +++ b/src/filtro_chido/Filtrado.java @@ -36,6 +36,7 @@ public class Filtrado extends javax.swing.JFrame { jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setName("Panel_Principal"); // NOI18N @@ -91,6 +92,13 @@ public class Filtrado extends javax.swing.JFrame { } }); + jButton4.setText("SRM"); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( @@ -107,7 +115,8 @@ public class Filtrado extends javax.swing.JFrame { .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 176, Short.MAX_VALUE)) ); @@ -121,7 +130,9 @@ public class Filtrado extends javax.swing.JFrame { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) - .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -157,6 +168,10 @@ public class Filtrado extends javax.swing.JFrame { }//GEN-LAST:event_jButton3ActionPerformed + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + SRM(); + }//GEN-LAST:event_jButton4ActionPerformed + /** * @param args the command line arguments */ @@ -196,6 +211,7 @@ public class Filtrado extends javax.swing.JFrame { private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; @@ -206,4 +222,8 @@ public class Filtrado extends javax.swing.JFrame { AdaptiveMedian mediana =new AdaptiveMedian(); mediana.showDialog(null, null, null); } + private void SRM (){ + SRM srm1 = new SRM(); + + } } diff --git a/src/filtro_chido/Filtro_Chido.java b/src/filtro_chido/Filtro_Chido.java index d4cb929..a891bd0 100644 --- a/src/filtro_chido/Filtro_Chido.java +++ b/src/filtro_chido/Filtro_Chido.java @@ -15,6 +15,7 @@ public class Filtro_Chido { public static void main(String[] args) { Filtrado fl = new Filtrado(); fl.show(); + } } diff --git a/src/filtro_chido/SRM.java b/src/filtro_chido/SRM.java new file mode 100644 index 0000000..f55b10d --- /dev/null +++ b/src/filtro_chido/SRM.java @@ -0,0 +1,378 @@ + +package filtro_chido; + +import ij.IJ; +import ij.ImagePlus; +import ij.ImageStack; +import ij.gui.GenericDialog; +import ij.plugin.filter.PlugInFilter; +import static ij.plugin.filter.PlugInFilter.DOES_8G; +import static ij.plugin.filter.PlugInFilter.NO_CHANGES; +import ij.process.ByteProcessor; +import ij.process.FloatProcessor; +import ij.process.ImageProcessor; +import ij.process.ShortProcessor; + +import java.util.Arrays; + + +public class SRM implements PlugInFilter { + ImagePlus image; + + public int setup(String arg, ImagePlus image) { + this.image = image; + return DOES_8G | NO_CHANGES; + } + + public void run(ImageProcessor ip) { + boolean isStack = image.getStackSize() > 1; + + GenericDialog gd = new GenericDialog("SRM"); + gd.addNumericField("Q", Q, 2); + gd.addCheckbox("showAverages", true); + if (isStack) + gd.addCheckbox("3d", true); + gd.showDialog(); + + if (gd.wasCanceled()) + return; + + Q = (float)gd.getNextNumber(); + boolean showAverages = gd.getNextBoolean(); + boolean do3D = isStack ? gd.getNextBoolean() : false; + if (do3D) + srm3D(showAverages).show(); + else + srm2D(ip, showAverages).show(); + } + + final float g = 256; // number of different intensity values + protected float Q = 25; //25; // complexity of the assumed distributions + protected float delta; + + protected float factor, logDelta; + + float[] average; + int[] count; + int[] regionIndex; // if < 0, it is -1 - actual_regionIndex + + int[] nextNeighbor, neighborBucket; + + protected ImagePlus srm3D(boolean showAverages) { + int w = image.getWidth(), h = image.getHeight(); + int d = image.getStackSize(); + + delta = 1f / (6 * w * h * d); + + factor = g * g / 2 / Q; + logDelta = 2f * (float)Math.log(6 * w * h * d); + + IJ.showStatus("Initializing regions"); + initializeRegions3D(w, h, d); + IJ.showStatus("Initializing neighbors"); + initializeNeighbors3D(w, h, d); + IJ.showStatus("Merging neighbors"); + mergeAllNeighbors3D(w, h); + IJ.showStatus("Making stack"); + + ImageStack stack = new ImageStack(w, h); + if (showAverages) + for (int k = 0; k < d; k++) { + int off = k * w * h; + float[] p = new float[w * h]; + for (int i = 0; i < w * h; i++) + p[i] = average[getRegionIndex(i + off)]; + stack.addSlice(null, new FloatProcessor(w, h, + p, null)); + } + else { + int regionCount = consolidateRegions(); + + if (regionCount > 1<<16) + IJ.showMessage("Found " + regionCount + + " regions, which does not fit" + + " in 16-bit."); + + for (int k = 0; k < d; k++) { + ImageProcessor ip; + + int off = k * w * h; + + if (regionCount > 1<<8) { + short[] p = new short[w * h]; + for (int i = 0; i < p.length; i++) + p[i] = (short)regionIndex[i + + off]; + ip = new ShortProcessor(w, h, p, null); + } + else { + byte[] p = new byte[w * h]; + for (int i = 0; i < p.length; i++) + p[i] = (byte)regionIndex[i + + off]; + ip = new ByteProcessor(w, h, p, null); + } + stack.addSlice(null, ip); + } + } + + IJ.showStatus(""); + String title = image.getTitle() + " (SRM3D Q=" + Q + ")"; + return new ImagePlus(title, stack); + } + + protected ImagePlus srm2D(ImageProcessor ip, boolean showAverages) { + int w = ip.getWidth(), h = ip.getHeight(); + + delta = 1f / (6 * w * h); + + factor = g * g / 2 / Q; + logDelta = 2f * (float)Math.log(6 * w * h); + + byte[] pixel = (byte[])ip.getPixels(); + initializeRegions2D(pixel, ip.getWidth(), ip.getHeight()); + initializeNeighbors2D(pixel, w, h); + mergeAllNeighbors2D(w); + + if (showAverages) { + for (int i = 0; i < average.length; i++) + average[i] = average[getRegionIndex(i)]; + ip = new FloatProcessor(w, h, average, null); + } + else { + int regionCount = consolidateRegions(); + + if (regionCount > 1<<8) { + if (regionCount > 1<<16) + IJ.showMessage("Found " + regionCount + + " regions, which does not fit" + + " in 16-bit."); + short[] pixel16 = new short[w * h]; + for (int i = 0; i < pixel16.length; i++) + pixel16[i] = (short)regionIndex[i]; + ip = new ShortProcessor(w, h, pixel16, null); + } + else { + pixel = new byte[w * h]; + for (int i = 0; i < pixel.length; i++) + pixel[i] = (byte)regionIndex[i]; + ip = new ByteProcessor(w, h, pixel, null); + } + } + + String title = image.getTitle() + " (SRM Q=" + Q + ")"; + return new ImagePlus(title, ip); + } + + void initializeRegions2D(byte[] pixel, int w, int h) { + average = new float[w * h]; + count = new int[w * h]; + regionIndex = new int[w * h]; + + for (int i = 0; i < average.length; i++) { + average[i] = pixel[i] & 0xff; + count[i] = 1; + regionIndex[i] = i; + } + } + + void initializeRegions3D(int w, int h, int d) { + average = new float[w * h * d]; + count = new int[w * h * d]; + regionIndex = new int[w * h * d]; + + for (int j = 0; j < d; j++) { + byte[] pixel = + (byte[])image.getStack().getProcessor(j + + 1).getPixels(); + int offset = j * w * h; + for (int i = 0; i < w * h; i++) { + average[offset + i] = pixel[i] & 0xff; + count[offset + i] = 1; + regionIndex[offset + i] = offset + i; + } + } + } + + protected void addNeighborPair(int neighborIndex, + byte[] pixel, int i1, int i2) { + int difference = Math.abs((pixel[i1] & 0xff) + - (pixel[i2] & 0xff)); + nextNeighbor[neighborIndex] = neighborBucket[difference]; + neighborBucket[difference] = neighborIndex; + } + + void initializeNeighbors2D(byte[] pixel, int w, int h) { + nextNeighbor = new int[2 * w * h]; + + // bucket sort + neighborBucket = new int[256]; + Arrays.fill(neighborBucket, -1); + + for (int j = h - 1; j >= 0; j--) + for (int i = w - 1; i >= 0; i--) { + int index = i + w * j; + int neighborIndex = 2 * index; + + // vertical + if (j < h - 1) + addNeighborPair(neighborIndex + 1, + pixel, index, index + w); + + // horizontal + if (i < w - 1) + addNeighborPair(neighborIndex, + pixel, index, index + 1); + } + } + + protected void addNeighborPair(int neighborIndex, + byte[] pixel, byte[] nextPixel, int i) { + int difference = Math.abs((pixel[i] & 0xff) + - (nextPixel[i] & 0xff)); + nextNeighbor[neighborIndex] = neighborBucket[difference]; + neighborBucket[difference] = neighborIndex; + } + + void initializeNeighbors3D(int w, int h, int d) { + nextNeighbor = new int[3 * w * h * d]; + + // bucket sort + neighborBucket = new int[256]; + Arrays.fill(neighborBucket, -1); + + byte[] nextPixel = null; + for (int k = d - 1; k >= 0; k--) { + byte[] pixel = + (byte[])image.getStack().getProcessor(k + + 1).getPixels(); + for (int j = h - 1; j >= 0; j--) + for (int i = w - 1; i >= 0; i--) { + int index = i + w * j; + int neighborIndex = + 3 * (index + k * w * h); + + // depth + if (nextPixel != null) + addNeighborPair(neighborIndex + + 2, pixel, + nextPixel, index); + + // vertical + if (j < h - 1) + addNeighborPair(neighborIndex + + 1, pixel, + index, index + w); + + // horizontal + if (i < w - 1) + addNeighborPair(neighborIndex, + pixel, + index, index + 1); + } + nextPixel = pixel; + } + } + + // recursively find out the region index for this pixel + int getRegionIndex(int i) { + i = regionIndex[i]; + while (i < 0) + i = regionIndex[-1 - i]; + return i; + } + + // should regions i1 and i2 be merged? + boolean predicate(int i1, int i2) { + float difference = average[i1] - average[i2]; + /* + * This would be the non-relaxed predicate mentioned in the + * paper. + * + * return difference * difference < + factor * (1f / count[i1] + 1f / count[i2]); + * + */ + float log1 = (float)Math.log(1 + count[i1]) + * (g < count[i1] ? g : count[i1]); + float log2 = (float)Math.log(1 + count[i2]) + * (g < count[i2] ? g : count[i2]); + return difference * difference < + .1f * factor * ((log1 + logDelta) / count[i1] + + ((log2 + logDelta) / count[i2])); + } + + void mergeAllNeighbors2D(int w) { + for (int i = 0; i < neighborBucket.length; i++) { + int neighborIndex = neighborBucket[i]; + while (neighborIndex >= 0) { + int i1 = neighborIndex / 2; + int i2 = i1 + + (0 == (neighborIndex & 1) ? 1 : w); + + i1 = getRegionIndex(i1); + i2 = getRegionIndex(i2); + + if (predicate(i1, i2)) + mergeRegions(i1, i2); + + neighborIndex = nextNeighbor[neighborIndex]; + } + } + } + + void mergeAllNeighbors3D(int w, int h) { + for (int i = 0; i < neighborBucket.length; i++) { + int neighborIndex = neighborBucket[i]; + IJ.showProgress(i, neighborBucket.length); + while (neighborIndex >= 0) { + int i1 = neighborIndex / 3; + int i2 = i1 + + (0 == (neighborIndex % 3) ? 1 : + (1 == (neighborIndex % 3) ? w : + w * h)); + + i1 = getRegionIndex(i1); + i2 = getRegionIndex(i2); + + if (i1 != i2 && predicate(i1, i2)) + mergeRegions(i1, i2); + + neighborIndex = nextNeighbor[neighborIndex]; + } + } + IJ.showProgress(neighborBucket.length, neighborBucket.length); + } + + void mergeRegions(int i1, int i2) { + if (i1 == i2) + return; + int mergedCount = count[i1] + count[i2]; + float mergedAverage = (average[i1] * count[i1] + + average[i2] * count[i2]) / mergedCount; + + // merge larger index into smaller index + if (i1 > i2) { + average[i2] = mergedAverage; + count[i2] = mergedCount; + regionIndex[i1] = -1 - i2; + } + else { + average[i1] = mergedAverage; + count[i1] = mergedCount; + regionIndex[i2] = -1 - i1; + } + } + + int consolidateRegions() { + + int count = 0; + for (int i = 0; i < regionIndex.length; i++) + if (regionIndex[i] < 0) + regionIndex[i] = + regionIndex[-1 - regionIndex[i]]; + else + regionIndex[i] = count++; + return count; + } +}