Commit d9d3a9de authored by danyfel80's avatar danyfel80
Browse files

v3.0.4-SNAPSHOT

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