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