@Test public void testTimeDimensionCancelsPlugin() throws Exception { final String expectedMessage = CommonMessages.HAS_TIME_DIMENSIONS + ". Please split the hyperstack."; final ImagePlus imagePlus = IJ.createHyperStack("test", 3, 3, 1, 3, 3, 8); final CommandModule module = command().run(SkeletoniseWrapper.class, true, "inputImage", imagePlus).get(); assertTrue("An image with time dimension should have cancelled the plugin", module.isCanceled()); assertEquals("Cancel reason is incorrect", expectedMessage, module .getCancelReason()); verify(MOCK_UI, timeout(1000)).dialogPrompt(anyString(), anyString(), any(), any()); }
@Override public void run() { skeleton = cleanDuplicate(inputImage); skeleton.setTitle("Skeleton of " + inputImage.getTitle()); final PlugInFilter skeletoniser = new Skeletonize3D_(); statusService.showStatus("Skeletonise: skeletonising"); skeletoniser.setup("", skeleton); skeletoniser.run(null); reportUsage(); }
SkeletoniseWrapper extends BoneJCommand { @Override public void run() { skeleton = cleanDuplicate(inputImage); skeleton.setTitle("Skeleton of " + inputImage.getTitle()); final PlugInFilter skeletoniser = new Skeletonize3D_(); statusService.showStatus("Skeletonise: skeletonising"); skeletoniser.setup("", skeleton); skeletoniser.run(null); reportUsage(); } }
SkeletoniseWrapper extends BoneJCommand { @Override public void run() { skeleton = cleanDuplicate(inputImage); skeleton.setTitle("Skeleton of " + inputImage.getTitle()); final PlugInFilter skeletoniser = new Skeletonize3D_(); statusService.showStatus("Skeletonise: skeletonising"); skeletoniser.setup("", skeleton); skeletoniser.run(null); reportUsage(); }  }
SkeletoniseWrapper extends BoneJCommand { @Override public void run() { skeleton = cleanDuplicate(inputImage); skeleton.setTitle("Skeleton of " + inputImage.getTitle()); final PlugInFilter skeletoniser = new Skeletonize3D_(); statusService.showStatus("Skeletonise: skeletonising"); skeletoniser.setup("", skeleton); skeletoniser.run(null); reportUsage(); }  @Override void run(); }
SkeletoniseWrapper extends BoneJCommand { @Override public void run() { skeleton = cleanDuplicate(inputImage); skeleton.setTitle("Skeleton of " + inputImage.getTitle()); final PlugInFilter skeletoniser = new Skeletonize3D_(); statusService.showStatus("Skeletonise: skeletonising"); skeletoniser.setup("", skeleton); skeletoniser.run(null); reportUsage(); }  @Override void run();  }