From a2f492700f3b33c7a6c575098e92d24f95af7a40 Mon Sep 17 00:00:00 2001 From: Stephan Preibisch Date: Thu, 16 Nov 2023 19:10:51 -0500 Subject: [PATCH] more hacks ... --- .../stitcher/gui/LinkExplorerTableModel.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/preibisch/stitcher/gui/LinkExplorerTableModel.java b/src/main/java/net/preibisch/stitcher/gui/LinkExplorerTableModel.java index 6a15d36..c4f1d8e 100644 --- a/src/main/java/net/preibisch/stitcher/gui/LinkExplorerTableModel.java +++ b/src/main/java/net/preibisch/stitcher/gui/LinkExplorerTableModel.java @@ -150,7 +150,7 @@ public Object getValueAt(int rowIndex, int columnIndex) // THIS IS A HACK, sometimes the pair from activeLinksAfterFilter.get( rowIndex ) does not exist in filteredResults.getPairwiseResults() // TODO: figure out why :) if ( filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ) == null ) - return null; + return ""; final Group< ViewId > views = filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ).pair().getA(); @@ -158,13 +158,30 @@ public Object getValueAt(int rowIndex, int columnIndex) } else if (columnIndex == 1) { + // THIS IS A HACK, sometimes the pair from activeLinksAfterFilter.get( rowIndex ) does not exist in filteredResults.getPairwiseResults() + // TODO: figure out why :) + if ( filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ) == null ) + return ""; + final Group< ViewId > views = filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ).pair().getB(); return views.toString(); } else if (columnIndex == 2) + { + // THIS IS A HACK, sometimes the pair from activeLinksAfterFilter.get( rowIndex ) does not exist in filteredResults.getPairwiseResults() + // TODO: figure out why :) + if ( filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ) == null ) + return ""; + return filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ).r(); + } else if (columnIndex == 3) { + // THIS IS A HACK, sometimes the pair from activeLinksAfterFilter.get( rowIndex ) does not exist in filteredResults.getPairwiseResults() + // TODO: figure out why :) + if ( filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ) == null ) + return ""; + double[] shift = filteredResults.getPairwiseResults().get( activeLinksAfterFilter.get( rowIndex ) ).getTransform().getRowPackedCopy(); StringBuilder res = new StringBuilder(); @@ -180,13 +197,9 @@ else if (columnIndex == 3) res.append(df.format( shift[11]) ); return res.toString(); } - else return ""; - } - - @Override public void setStitchingResults(StitchingResults res)