/** * Formats the input value for the physical size in Z into a length in * microns. * * @param value the value of the physical size in Z in microns * * @return the physical size formatted as a {@link Length} */ public static Length getPhysicalSizeZ(Double value) { return getPhysicalSizeZ(value, UNITS.MICROMETER); }
/** * Formats the input value for the physical size in Z into a length in * microns. * * @param value the value of the physical size in Z in microns * * @return the physical size formatted as a {@link Length} */ public static Length getPhysicalSizeZ(Double value) { return getPhysicalSizeZ(value, UNITS.MICROMETER); }
/** * Checks the original metadata table for ImageJ-specific information * to propagate into the metadata store. */ private void populateMetadataStoreImageJ(MetadataStore store) { // TODO: Perhaps we should only populate the physical Z size if the unit is // a known, physical quantity such as "micron" rather than "pixel". // e.g.: if (calibrationUnit.equals("micron")) if (physicalSizeZ != null) { double zDepth = physicalSizeZ.doubleValue(); if (zDepth < 0) zDepth = -zDepth; Length z = FormatTools.getPhysicalSizeZ(zDepth); if (z != null) { store.setPixelsPhysicalSizeZ(z, 0); } } if (timeIncrement != null) { store.setPixelsTimeIncrement(timeIncrement, 0); } }
/** * Checks the original metadata table for ImageJ-specific information * to propagate into the metadata store. */ private void populateMetadataStoreImageJ(MetadataStore store) { // TODO: Perhaps we should only populate the physical Z size if the unit is // a known, physical quantity such as "micron" rather than "pixel". // e.g.: if (calibrationUnit.equals("micron")) if (physicalSizeZ != null) { double zDepth = physicalSizeZ.doubleValue(); if (zDepth < 0) zDepth = -zDepth; Length z = FormatTools.getPhysicalSizeZ(zDepth); if (z != null) { store.setPixelsPhysicalSizeZ(z, 0); } } if (timeIncrement != null) { store.setPixelsTimeIncrement(timeIncrement, 0); } }
Length sizeX = FormatTools.getPhysicalSizeX(physicalSizeX); Length sizeY = FormatTools.getPhysicalSizeY(physicalSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(physicalSizeZ); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);
Length sizeX = FormatTools.getPhysicalSizeX(physicalSizeX); Length sizeY = FormatTools.getPhysicalSizeY(physicalSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(physicalSizeZ); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);
@Test(dataProvider = "physicalSizeNoUnit") public void testGetPhysicalSizeNoUnit(Double value, Length length) { assertEquals(length, FormatTools.getPhysicalSizeX(value)); assertEquals(length, FormatTools.getPhysicalSizeY(value)); assertEquals(length, FormatTools.getPhysicalSizeZ(value)); }
@Test(dataProvider = "physicalSizeStringUnit") public void testGetPhysicalSizeStringUnit(Double value, String unit, Length length) { assertEquals(length, FormatTools.getPhysicalSizeX(value, unit)); assertEquals(length, FormatTools.getPhysicalSizeY(value, unit)); assertEquals(length, FormatTools.getPhysicalSizeZ(value, unit)); }
@Test(dataProvider = "physicalSizeUnit") public void testGetPhysicalSizeUnit(Double value, Unit<Length> unit, Length length) { assertEquals(length, FormatTools.getPhysicalSizeX(value, unit)); assertEquals(length, FormatTools.getPhysicalSizeY(value, unit)); assertEquals(length, FormatTools.getPhysicalSizeZ(value, unit)); }
Length sizeZ = FormatTools.getPhysicalSizeZ(pixelDepth);
Length sizeX = FormatTools.getPhysicalSizeX(pixelSizeX); Length sizeY = FormatTools.getPhysicalSizeY(pixelSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(pixelSizeZ);
Length sizeX = FormatTools.getPhysicalSizeX(pixelSizeX); Length sizeY = FormatTools.getPhysicalSizeY(pixelSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(pixelSizeZ);
FormatTools.getPhysicalSizeY(new Double(voxelHeight), spatialUnit); Length sizeZ = FormatTools.getPhysicalSizeZ(new Double(sliceThickness), spatialUnit);
Length sizeZ = FormatTools.getPhysicalSizeZ(physicalSizeZ);
Length sizeZ = FormatTools.getPhysicalSizeZ(physicalSizeZ);
Length sizeX = FormatTools.getPhysicalSizeX(pixelSizeX); Length sizeY = FormatTools.getPhysicalSizeY(pixelSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(pixelSizeZ); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);
Length sizeX = FormatTools.getPhysicalSizeX(pixelSizeX); Length sizeY = FormatTools.getPhysicalSizeY(pixelSizeY); Length sizeZ = FormatTools.getPhysicalSizeZ(pixelSizeZ); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);
Length sizeZ = FormatTools.getPhysicalSizeZ(p.sliceThickness); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, i);
Length sizeX = FormatTools.getPhysicalSizeX(xSize / getSizeX()); Length sizeY = FormatTools.getPhysicalSizeY(ySize / getSizeY()); Length sizeZ = FormatTools.getPhysicalSizeZ(zSize / getSizeZ()); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);
Length sizeX = FormatTools.getPhysicalSizeX(xSize / getSizeX()); Length sizeY = FormatTools.getPhysicalSizeY(ySize / getSizeY()); Length sizeZ = FormatTools.getPhysicalSizeZ(zSize / getSizeZ()); if (sizeX != null) { store.setPixelsPhysicalSizeX(sizeX, 0);