Commit 5784c615 authored by lafabregue's avatar lafabregue

small fixes

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