From fed795d4cb602852e8431dc150a5aac26853778f Mon Sep 17 00:00:00 2001 From: Gabriel Einsdorf Date: Fri, 24 Nov 2017 10:46:06 +0100 Subject: [PATCH] Img/Labeling Cell: Use full path for hashkey calculation --- .../src/org/knime/knip/base/data/img/ImgPlusCell.java | 4 ++-- .../src/org/knime/knip/base/data/labeling/LabelingCell.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.knime.knip.base/src/org/knime/knip/base/data/img/ImgPlusCell.java b/org.knime.knip.base/src/org/knime/knip/base/data/img/ImgPlusCell.java index 99462990..69a1d34a 100644 --- a/org.knime.knip.base/src/org/knime/knip/base/data/img/ImgPlusCell.java +++ b/org.knime.knip.base/src/org/knime/knip/base/data/img/ImgPlusCell.java @@ -303,7 +303,7 @@ public synchronized ImgPlus getImgPlus() { } } } - final ImgPlus imgPlus = new ImgPlus(tmpImg, m_metadataAccess.get().getMetadata()); + final ImgPlus imgPlus = new ImgPlus<>(tmpImg, m_metadataAccess.get().getMetadata()); imgPlus.setSource(m_metadataAccess.get().getMetadata().getSource()); return imgPlus; @@ -493,7 +493,7 @@ public int hashCode() { } private String stringHashCode() { - return IMG_PLUS_CELL_KEY + getFileStore().getFile().getName() + m_fileMetadata.getOffset(); + return IMG_PLUS_CELL_KEY + getFileStore().getFile().getAbsolutePath() + m_fileMetadata.getOffset(); } /** diff --git a/org.knime.knip.base/src/org/knime/knip/base/data/labeling/LabelingCell.java b/org.knime.knip.base/src/org/knime/knip/base/data/labeling/LabelingCell.java index e9aad62d..1bc61e97 100644 --- a/org.knime.knip.base/src/org/knime/knip/base/data/labeling/LabelingCell.java +++ b/org.knime.knip.base/src/org/knime/knip/base/data/labeling/LabelingCell.java @@ -375,7 +375,7 @@ public synchronized Image getThumbnail(final RenderingHints renderingHints) { } private String stringHashCode() { - return LABELING_CELL_KEY + getFileStore().getFile().getName() + m_fileMetadata.getOffset(); + return LABELING_CELL_KEY + getFileStore().getFile().getAbsolutePath() + m_fileMetadata.getOffset(); } private int getThumbnailWidth(final int height) {