@Test public void testEllipsoidFittingFailingCancelsPlugins() throws Exception { final CommandModule module = command().run(AnisotropyWrapper.class, true, "inputImage", hyperSheets, "lines", 1, "directions", 9).get(); assertTrue(module.isCanceled()); assertEquals( "Anisotropy could not be calculated - ellipsoid fitting failed", module .getCancelReason()); }
@Override public void run() { sections = (long) Math.sqrt(lines); statusService.showStatus("Anisotropy: initialising"); subspaces = find3DSubspaces(inputImage); calculateMILLength(subspaces.get(0).interval); matchOps(subspaces.get(0).interval); final List<Ellipsoid> ellipsoids = new ArrayList<>(); for (int i = 0; i < subspaces.size(); i++) { statusService.showStatus("Anisotropy: sampling subspace #" + (i + 1)); final RandomAccessibleInterval<BitType> interval = subspaces.get(i).interval; final Ellipsoid ellipsoid = milEllipsoid(interval); if (ellipsoid == null) { return; } ellipsoids.add(ellipsoid); } addResults(subspaces, ellipsoids); resultsTable = SharedTable.getTable(); reportUsage(); }
AnisotropyWrapper extends BoneJCommand { @Override public void run() { sections = (long) Math.sqrt(lines); statusService.showStatus("Anisotropy: initialising"); subspaces = find3DSubspaces(inputImage); calculateMILLength(subspaces.get(0).interval); matchOps(subspaces.get(0).interval); final List<Ellipsoid> ellipsoids = new ArrayList<>(); for (int i = 0; i < subspaces.size(); i++) { statusService.showStatus("Anisotropy: sampling subspace #" + (i + 1)); final RandomAccessibleInterval<BitType> interval = subspaces.get(i).interval; final Ellipsoid ellipsoid = milEllipsoid(interval); if (ellipsoid == null) { return; } ellipsoids.add(ellipsoid); } addResults(subspaces, ellipsoids); resultsTable = SharedTable.getTable(); reportUsage(); } }
AnisotropyWrapper extends BoneJCommand { @Override public void run() { sections = (long) Math.sqrt(lines); statusService.showStatus("Anisotropy: initialising"); subspaces = find3DSubspaces(inputImage); calculateMILLength(subspaces.get(0).interval); matchOps(subspaces.get(0).interval); final List<Ellipsoid> ellipsoids = new ArrayList<>(); for (int i = 0; i < subspaces.size(); i++) { statusService.showStatus("Anisotropy: sampling subspace #" + (i + 1)); final RandomAccessibleInterval<BitType> interval = subspaces.get(i).interval; final Ellipsoid ellipsoid = milEllipsoid(interval); if (ellipsoid == null) { return; } ellipsoids.add(ellipsoid); } addResults(subspaces, ellipsoids); resultsTable = SharedTable.getTable(); reportUsage(); }  }
AnisotropyWrapper extends BoneJCommand { @Override public void run() { sections = (long) Math.sqrt(lines); statusService.showStatus("Anisotropy: initialising"); subspaces = find3DSubspaces(inputImage); calculateMILLength(subspaces.get(0).interval); matchOps(subspaces.get(0).interval); final List<Ellipsoid> ellipsoids = new ArrayList<>(); for (int i = 0; i < subspaces.size(); i++) { statusService.showStatus("Anisotropy: sampling subspace #" + (i + 1)); final RandomAccessibleInterval<BitType> interval = subspaces.get(i).interval; final Ellipsoid ellipsoid = milEllipsoid(interval); if (ellipsoid == null) { return; } ellipsoids.add(ellipsoid); } addResults(subspaces, ellipsoids); resultsTable = SharedTable.getTable(); reportUsage(); }  @Override void run(); }
AnisotropyWrapper extends BoneJCommand { @Override public void run() { sections = (long) Math.sqrt(lines); statusService.showStatus("Anisotropy: initialising"); subspaces = find3DSubspaces(inputImage); calculateMILLength(subspaces.get(0).interval); matchOps(subspaces.get(0).interval); final List<Ellipsoid> ellipsoids = new ArrayList<>(); for (int i = 0; i < subspaces.size(); i++) { statusService.showStatus("Anisotropy: sampling subspace #" + (i + 1)); final RandomAccessibleInterval<BitType> interval = subspaces.get(i).interval; final Ellipsoid ellipsoid = milEllipsoid(interval); if (ellipsoid == null) { return; } ellipsoids.add(ellipsoid); } addResults(subspaces, ellipsoids); resultsTable = SharedTable.getTable(); reportUsage(); }  @Override void run();  }