Commit 2607a0f8 authored by danyfel80's avatar danyfel80
Browse files

v3.0.2

- Fixed Columbus fields y axis inverted
- Fixed displayed field column
- Fixed min value on field slider
parent e9da906f
......@@ -7,7 +7,7 @@
<version>1.0.1</version>
</parent>
<artifactId>well-plate-reader</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<name>Well Plate Reader</name>
<description/>
<build>
......
package danyfel80.wells.data.columbus;
import java.awt.Color;
import java.awt.geom.Rectangle2D;
import java.util.Date;
import java.util.Optional;
......@@ -112,7 +113,7 @@ public class ColumbusImage implements IImage
image.sizeX = imageSizeX;
image.sizeY = imageSizeY;
image.positionX = imagePositionX;
image.positionY = imagePositionY;
image.positionY = -imagePositionY;
image.positionZ = imagePositionZ;
image.absPositionZ = imageAbsPositionZ;
image.time = imageTime;
......@@ -262,6 +263,11 @@ public class ColumbusImage implements IImage
return positionY;
}
public Rectangle2D getBounds()
{
return new Rectangle2D.Double(positionX, positionY, sizeX*resolutionX, sizeY*resolutionY);
}
public double getAbsPositionZ()
{
return absPositionZ;
......
......@@ -6,6 +6,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
......@@ -36,11 +37,10 @@ public class ColumbusWell implements IWell
well.id = wellId;
well.positionInPlate = new Point(wellRow, wellCol);
Map<String, ColumbusImage> filteredImages = images.entrySet().stream()
.filter(im -> wellImageIds.contains(im.getKey()))
.collect(Collectors.toMap(Entry::getKey, Entry::getValue));
Map<String, ColumbusImage> wellImages = wellImageIds.stream().map(imId -> images.get(imId))
.collect(Collectors.toMap(ColumbusImage::getId, Function.identity()));
Map<Long, List<ColumbusImage>> fieldImages = filteredImages.values().stream()
Map<Long, List<ColumbusImage>> fieldImages = wellImages.values().stream()
.collect(Collectors.groupingBy(ColumbusImage::getFieldId));
Map<Long, ColumbusField> fields = fieldImages.entrySet().stream()
......
......@@ -156,7 +156,7 @@ public class WellPlateViewer extends IcyFrame
WellViewer wellViewInPlate = new WellViewer(well, false);
if (well != null)
{
final char colWell = (char) ('A' + col);
final char colWell = (char) ('A' + (col - 1));
final int rowWell = row;
final List<Long> fieldIds = new ArrayList<>(well.getFields().keySet());
......@@ -171,7 +171,7 @@ public class WellPlateViewer extends IcyFrame
fieldSlider.setVisible(!well.getFields().isEmpty());
if (!well.getFields().isEmpty())
{
fieldSlider.setMinimum(0);
fieldSlider.setMinimum(1);
fieldSlider.setMaximum(fieldIds.size());
}
......
......@@ -167,11 +167,11 @@ public class WellPlateReader_ColumbusOperaFlex extends AbstractWellPlateReader
sequence.setPixelSizeY(pixelSize.getSizeY());
for (Entry<Integer, String> entry : channelNames.entrySet())
{
sequence.setChannelName(entry.getKey(), entry.getValue());
sequence.setChannelName(entry.getKey()-1, entry.getValue());
}
for (Entry<Integer, IcyColorMap> entry : channelColors.entrySet())
{
sequence.setColormap(entry.getKey(), entry.getValue(), true);
sequence.setColormap(entry.getKey()-1, entry.getValue(), true);
}
}
finally
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment