Commit 5784c615 authored by lafabregue's avatar lafabregue

small fixes

parent 61278aa7
......@@ -35,7 +35,6 @@ import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.weights.ClassificationWeights;
import jcl.weights.GlobalWeights;
import jsl.Segmentation;
import multiCube.tools.image.ImageHelper;
import multiCube.tools.util.gui.ProgressStatus;
import mustic.gui.dialog.*;
import mustic.gui.dialog.arff.ArffLoadDialog;
......
......@@ -93,6 +93,7 @@ public class ProgressThreadJCL extends Thread {
}
}
this.b.setValue(0);
this.d.reset();
}
}
}
......@@ -1001,8 +1001,8 @@ public class ImageSampler extends Sampler {
public OneImageStreamedIterator(final ImageSampler sampler) {
this.cursorX = 0;
this.cursorY = 0;
this.endY = sampler.imageHeight;
this.endX = sampler.imageWidth;
this.endY = sampler.imageHeight-1;
this.endX = sampler.imageWidth-1;
this.imageWidth = sampler.imageWidth;
this.reader = sampler.getReaders().get(0);
}
......@@ -1012,8 +1012,8 @@ public class ImageSampler extends Sampler {
this.cursorX = start % sampler.imageWidth;
this.cursorY = start / sampler.imageWidth;
if (end >= sampler.imageHeight * sampler.imageWidth -1) {
this.endY = sampler.imageHeight;
this.endX = sampler.imageWidth;
this.endY = sampler.imageHeight-1;
this.endX = sampler.imageWidth-1;
} else {
this.endX = end % sampler.imageWidth;
this.endY = end / sampler.imageWidth;
......@@ -1023,7 +1023,7 @@ public class ImageSampler extends Sampler {
}
public boolean hasNext() {
return (cursorY < endY) || ((cursorY == endY-1) && (cursorX < endX));
return (cursorY < endY) || ((cursorY == endY) && (cursorX < endX));
}
public DataObject next() {
......@@ -1073,8 +1073,8 @@ public class ImageSampler extends Sampler {
public ImageSequenceStreamedIterator(final ImageSampler sampler) {
this.cursorX = 0;
this.cursorY = 0;
this.endY = sampler.imageHeight;
this.endX = sampler.imageWidth;
this.endY = sampler.imageHeight-1;
this.endX = sampler.imageWidth-1;
this.imageWidth = sampler.imageWidth;
this.readers = sampler.getReaders();
this.channelCount = sampler.getReaders().get(0).getChannelCount();
......@@ -1085,8 +1085,8 @@ public class ImageSampler extends Sampler {
this.cursorX = start % sampler.imageWidth;
this.cursorY = start / sampler.imageWidth;
if (end >= sampler.imageHeight * sampler.imageWidth -1) {
this.endY = sampler.imageHeight;
this.endX = sampler.imageWidth;
this.endY = sampler.imageHeight-1;
this.endX = sampler.imageWidth-1;
} else {
this.endX = end % sampler.imageWidth;
this.endY = end / sampler.imageWidth;
......@@ -1097,7 +1097,7 @@ public class ImageSampler extends Sampler {
}
public boolean hasNext() {
return (cursorY < endY) || ((cursorY == endY-1) && (cursorX < endX));
return (cursorY < endY) || ((cursorY == endY) && (cursorX < endX));
}
public DataObject next() {
......@@ -1155,8 +1155,8 @@ public class ImageSampler extends Sampler {
public GeoTranslatedImageSequenceStreamedIterator(final ImageSampler sampler) {
this.cursorX = sampler.getStartX();
this.cursorY = sampler.getStartY();
this.endX = sampler.getStartX() + sampler.imageWidth;
this.endY = sampler.getStartY() + sampler.imageHeight;
this.endX = sampler.getStartX() + sampler.imageWidth-1;
this.endY = sampler.getStartY() + sampler.imageHeight-1;
this.bStartX = sampler.getStartX();
this.bStartY = sampler.getStartY();
this.imageWidth = sampler.imageWidth;
......@@ -1176,8 +1176,8 @@ public class ImageSampler extends Sampler {
this.cursorX = start % sampler.imageWidth;
this.cursorY = start / sampler.imageWidth;
if (end >= sampler.imageHeight * sampler.imageWidth -1) {
this.endY = sampler.imageHeight;
this.endX = sampler.imageWidth;
this.endY = sampler.imageHeight-1;
this.endX = sampler.imageWidth-1;
} else {
this.endX = end % sampler.imageWidth;
this.endY = end / sampler.imageWidth;
......@@ -1193,7 +1193,7 @@ public class ImageSampler extends Sampler {
}
public boolean hasNext() {
return (cursorY < endY) || ((cursorY == endY-1) && (cursorX < endX));
return (cursorY < endY) || ((cursorY == endY) && (cursorX < endX));
}
public DataObject next() {
......
Markdown is supported
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