@Test public void testSwcHelper() throws Exception { final StackVersion stackVersion = new StackVersion(new Date(), null, null, null, 4.0, 4.0, 35.0, null, null); final CoordinateClient.SWCHelper swcHelper = new CoordinateClient.SWCHelper(stackVersion, stackVersion); final List<TileCoordinates> coordinatesList = new ArrayList<>(); final String swcSourceDirectoryPath = "src/test/resources/swc"; swcHelper.addCoordinatesForAllFilesInDirectory(swcSourceDirectoryPath, coordinatesList); Assert.assertEquals("invalid number of coordinates parsed from swc directory", 99, coordinatesList.size()); targetSwcDirectory = MipmapClientTest.createTestDirectory("target_swc"); swcHelper.saveMappedResults(coordinatesList, targetSwcDirectory.getAbsolutePath()); final String swcFileName = "8881_swc.swc"; final File sourceFile = new File(swcSourceDirectoryPath, swcFileName); final File targetFile = new File(targetSwcDirectory, swcFileName); Assert.assertTrue(targetFile.getAbsolutePath() + " was not saved", targetFile.exists()); final String beforeText = Files.toString(sourceFile, Charset.defaultCharset()); final String afterText = Files.toString(targetFile, Charset.defaultCharset()); final String hackedAfterTextForComparison = afterText.replaceAll("\\.0", ""); Assert.assertEquals(swcFileName + " contents should be the same", beforeText, hackedAfterTextForComparison); }
@Override public String toString() { return "CoordinateClient{" + "renderDataClient=" + renderDataClient + ", stack='" + stack + '\'' + ", z='" + z + '\'' + '}'; }
CoordinateClient { @Override public String toString() { return "CoordinateClient{" + "renderDataClient=" + renderDataClient + ", stack='" + stack + '\'' + ", z='" + z + '\'' + '}'; } }
CoordinateClient { @Override public String toString() { return "CoordinateClient{" + "renderDataClient=" + renderDataClient + ", stack='" + stack + '\'' + ", z='" + z + '\'' + '}'; } CoordinateClient(final String stack,
                            final Double z,
                            final RenderDataClient renderDataClient,
                            final int numberOfThreads); }
CoordinateClient { @Override public String toString() { return "CoordinateClient{" + "renderDataClient=" + renderDataClient + ", stack='" + stack + '\'' + ", z='" + z + '\'' + '}'; } CoordinateClient(final String stack,
                            final Double z,
                            final RenderDataClient renderDataClient,
                            final int numberOfThreads); static void main(final String[] args); @Override String toString(); StackVersion getStackVersion(); List<List<TileCoordinates>> getWorldCoordinatesWithTileIds(final List<TileCoordinates> worldCoordinatesList); List<List<TileCoordinates>> worldToLocalInBatches(final List<TileCoordinates> loadedWorldCoordinates); List<List<TileCoordinates>> worldToLocal(final List<List<TileCoordinates>> worldListOfLists,
                                                    final ResolvedTileSpecCollection tiles); List<TileCoordinates> localToWorldInBatches(final List<List<TileCoordinates>> loadedLocalCoordinates); List<TileCoordinates> localToWorld(final List<List<TileCoordinates>> localListOfLists,
                                              final ResolvedTileSpecCollection tiles); static List<TileCoordinates> loadJsonArrayOfCoordinates(final String path); static List<List<TileCoordinates>> loadJsonArrayOfArraysOfCoordinates(final String path); static List<Integer> getBatchIndexes(final int numberOfThreads,
                                                final int size); }
CoordinateClient { @Override public String toString() { return "CoordinateClient{" + "renderDataClient=" + renderDataClient + ", stack='" + stack + '\'' + ", z='" + z + '\'' + '}'; } CoordinateClient(final String stack,
                            final Double z,
                            final RenderDataClient renderDataClient,
                            final int numberOfThreads); static void main(final String[] args); @Override String toString(); StackVersion getStackVersion(); List<List<TileCoordinates>> getWorldCoordinatesWithTileIds(final List<TileCoordinates> worldCoordinatesList); List<List<TileCoordinates>> worldToLocalInBatches(final List<TileCoordinates> loadedWorldCoordinates); List<List<TileCoordinates>> worldToLocal(final List<List<TileCoordinates>> worldListOfLists,
                                                    final ResolvedTileSpecCollection tiles); List<TileCoordinates> localToWorldInBatches(final List<List<TileCoordinates>> loadedLocalCoordinates); List<TileCoordinates> localToWorld(final List<List<TileCoordinates>> localListOfLists,
                                              final ResolvedTileSpecCollection tiles); static List<TileCoordinates> loadJsonArrayOfCoordinates(final String path); static List<List<TileCoordinates>> loadJsonArrayOfArraysOfCoordinates(final String path); static List<Integer> getBatchIndexes(final int numberOfThreads,
                                                final int size);  }