Commit d9d3a9de authored by danyfel80's avatar danyfel80
Browse files

v3.0.4-SNAPSHOT

added alphanumeric well id
parent cd7da198
...@@ -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.3</version> <version>3.0.4-SNAPSHOT</version>
<name>Well Plate Reader</name> <name>Well Plate Reader</name>
<description/> <description/>
<build> <build>
......
...@@ -4,12 +4,20 @@ import java.awt.Point; ...@@ -4,12 +4,20 @@ import java.awt.Point;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.util.Map; import java.util.Map;
import icy.util.StringUtil;
public interface IWell public interface IWell
{ {
long getId(); long getId();
Point getPositionInPlate(); Point getPositionInPlate();
default String getAlphanumericID()
{
Point pos = getPositionInPlate();
return "" + ((char) ('A' + pos.x - 1)) + StringUtil.toString(pos.y, 2);
}
Map<Long, ? extends IField> getFields(); Map<Long, ? extends IField> getFields();
IWellShape getShape(); IWellShape getShape();
......
...@@ -89,8 +89,7 @@ public class WellPlateViewer extends IcyFrame ...@@ -89,8 +89,7 @@ public class WellPlateViewer extends IcyFrame
Future<? extends Sequence> sequenceFuture = plateReader.loadField(wellPlate, well, field, Future<? extends Sequence> sequenceFuture = plateReader.loadField(wellPlate, well, field,
viewerSequence, null); viewerSequence, null);
Sequence sequence = sequenceFuture.get(); Sequence sequence = sequenceFuture.get();
sequence.setName("Well" + ((char) ('A' + well.getPositionInPlate().x - 1)) sequence.setName("Well" + well.getAlphanumericID() + "_Field" + field.getId());
+ StringUtil.toString(well.getPositionInPlate().y, 2) + "_Field" + field.getId());
selectedFieldLabel.setText("Field " + field.getId()); selectedFieldLabel.setText("Field " + field.getId());
fieldSlider.setValue((int) field.getId()); fieldSlider.setValue((int) field.getId());
if (sequence.getFirstViewer() == null) if (sequence.getFirstViewer() == null)
......
package plugins.adufour.hcs.blocks; package plugins.adufour.hcs.blocks;
import java.awt.Point;
import java.io.File; import java.io.File;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
...@@ -16,7 +15,6 @@ import icy.gui.frame.progress.CancelableProgressFrame; ...@@ -16,7 +15,6 @@ import icy.gui.frame.progress.CancelableProgressFrame;
import icy.sequence.Sequence; import icy.sequence.Sequence;
import icy.system.IcyHandledException; import icy.system.IcyHandledException;
import icy.system.SystemUtil; import icy.system.SystemUtil;
import icy.util.StringUtil;
import plugins.adufour.blocks.lang.Batch; import plugins.adufour.blocks.lang.Batch;
import plugins.adufour.blocks.lang.FileBatch; import plugins.adufour.blocks.lang.FileBatch;
import plugins.adufour.blocks.util.VarList; import plugins.adufour.blocks.util.VarList;
...@@ -192,10 +190,7 @@ public class WellPlateBatch extends Batch ...@@ -192,10 +190,7 @@ public class WellPlateBatch extends Batch
{ {
if (wellFilterValues.length != 0) if (wellFilterValues.length != 0)
{ {
Point wellPos = well.getPositionInPlate(); String wellAlphanumeric = well.getAlphanumericID();
char col = ((char) ('A' + wellPos.x - 1));
String row = StringUtil.toString(wellPos.y, 2);
String wellAlphanumeric = "" + col + row;
for (String filter : wellFilterValues) for (String filter : wellFilterValues)
{ {
if (wellAlphanumeric.contains(filter)) if (wellAlphanumeric.contains(filter))
...@@ -225,9 +220,8 @@ public class WellPlateBatch extends Batch ...@@ -225,9 +220,8 @@ public class WellPlateBatch extends Batch
if (fieldIterator.hasNext()) if (fieldIterator.hasNext())
{ {
IField currentField = fieldIterator.next(); IField currentField = fieldIterator.next();
Point pos = currentWell.getPositionInPlate();
plateID.setValue(currentWellPlate.getId()); plateID.setValue(currentWellPlate.getId());
wellID.setValue("" + ((char) ('A' + pos.x - 1)) + StringUtil.toString(pos.y, 2)); wellID.setValue(currentWell.getAlphanumericID());
fieldID.setValue((int) currentField.getId()); fieldID.setValue((int) currentField.getId());
reader.loadField(currentWellPlate, currentWell, currentField, sequence, null); reader.loadField(currentWellPlate, currentWell, currentField, sequence, null);
sequence.setName(plateID.getValueAsString() + "_" + wellID.getValueAsString() + "_" sequence.setName(plateID.getValueAsString() + "_" + wellID.getValueAsString() + "_"
......
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