public String getImageDescription() { return currentTable.get(DESCRIPTION); }
/** Gets the table with the given name (header). */ public IniTable getTable(String tableName) { for (IniTable table : this) { String header = table.get(IniTable.HEADER_KEY); if (tableName.equals(header)) return table; } return null; }
public long getAccessTimeMillis() { String millis = globalTable.get(ACCESS_TIME); if (millis == null) return -1; return Long.parseLong(millis); }
public int getMemory() { String memory = globalTable.get(MEMORY); if (memory == null) return -1; return Integer.parseInt(memory); }
public Double getPositionX(int plane) { String pos = currentTable.get(X_POSITION + plane); return pos == null ? null : new Double(pos); }
public Double getDeltaT(int plane) { String deltaT = currentTable.get(DELTA_T + plane); return deltaT == null ? null : new Double(deltaT); }
public int getSizeT() { return Integer.parseInt(currentTable.get(SIZE_T)); }
/** * Gets the table names (headers) in the list. * @return a List containing the name of each {@link IniTable} */ public List<String> getHeaders() { List<String> headers = new ArrayList<String>(); for (IniTable table : this) { String header = table.get(IniTable.HEADER_KEY); headers.add(header); } return headers; }
/** Gets the table names (headers) in the list. */ public List<String> getHeaders() { List<String> headers = new ArrayList<String>(); for (IniTable table : this) { String header = table.get(IniTable.HEADER_KEY); headers.add(header); } return headers; }
public Time getExposureTime(int channel) { String exposure = currentTable.get(EXPOSURE_TIME + channel); String exposureUnits = currentTable.get(EXPOSURE_TIME_UNIT + channel); try { return exposure == null ? null : FormatTools.getTime(new Double(exposure), exposureUnits); } catch (NumberFormatException e) { return null; } }
public Time getTimeIncrement() { String timeIncrement = currentTable.get(TIME_INCREMENT); String timeIncrementUnits = currentTable.get(TIME_INCREMENT_UNIT); try { return timeIncrement == null ? null : FormatTools.getTime(new Double(timeIncrement), timeIncrementUnits); } catch (NumberFormatException e) { return null; } }
public Length getExcitationWavelength(int channel) { String wavelength = currentTable.get(EXCITATION_WAVELENGTH + channel); String excitationUnits = currentTable.get(EXCITATION_WAVELENGTH_UNIT + channel); try { return wavelength == null ? null : FormatTools.getWavelength(new Double(wavelength), excitationUnits); } catch (NumberFormatException e) { return null; } }
public Length getEmissionWavelength(int channel) { String wavelength = currentTable.get(EMISSION_WAVELENGTH + channel); String emissionUnits = currentTable.get(EMISSION_WAVELENGTH_UNIT + channel); try { return wavelength == null ? null : FormatTools.getWavelength(new Double(wavelength), emissionUnits); } catch (NumberFormatException e) { return null; } }
public Length getPhysicalSizeY() { String physicalSize = currentTable.get(PHYSICAL_SIZE_Y); String sizeYUnits = currentTable.get(PHYSICAL_SIZE_Y_UNIT); try { UnitsLength yUnits = sizeYUnits == null ? UnitsLength.MICROMETER : UnitsLength.fromString(sizeYUnits); return physicalSize == null ? null : UnitsLength.create(new Double(physicalSize), yUnits); } catch (NumberFormatException e) { } catch (EnumerationException e) { } return null; }
public Length getPhysicalSizeX() { String physicalSize = currentTable.get(PHYSICAL_SIZE_X); String sizeXUnits = currentTable.get(PHYSICAL_SIZE_X_UNIT); try { UnitsLength xUnits = sizeXUnits == null ? UnitsLength.MICROMETER : UnitsLength.fromString(sizeXUnits); return physicalSize == null ? null : UnitsLength.create(new Double(physicalSize), xUnits); } catch (NumberFormatException e) { } catch (EnumerationException e) { } return null; }
public Length getPhysicalSizeZ() { String physicalSize = currentTable.get(PHYSICAL_SIZE_Z); String sizeZUnits = currentTable.get(PHYSICAL_SIZE_Z_UNIT); try { UnitsLength zUnits = sizeZUnits == null ? UnitsLength.MICROMETER : UnitsLength.fromString(sizeZUnits); return physicalSize == null ? null : UnitsLength.create(new Double(physicalSize), zUnits); } catch (NumberFormatException e) { } catch (EnumerationException e) { } return null; }
public OptionsList(IniList ini) { options = new HashMap<String, Option>(); for (IniTable entry : ini) { String type = entry.get(INI_TYPE); Option o; if (type.equals(TYPE_BOOLEAN)) o = new BooleanOption(entry); else if (type.equals(TYPE_STRING)) o = new StringOption(entry); else throw new IllegalArgumentException("Unknown type: " + type); options.put(o.getKey(), o); } }
public OptionsList(IniList ini) { options = new HashMap<String, Option>(); for (IniTable entry : ini) { String type = entry.get(INI_TYPE); Option o; if (type.equals(TYPE_BOOLEAN)) o = new BooleanOption(entry); else if (type.equals(TYPE_STRING)) o = new StringOption(entry); else throw new IllegalArgumentException("Unknown type: " + type); options.put(o.getKey(), o); } }