Commit 1ebd5b90 authored by balanche's avatar balanche

Ajout d'une dernière étape de progress bar lors de la classification +...

Ajout d'une dernière étape de progress bar lors de la classification + Suppression des scrollbars sur le panel Dataset
parent 75394fbf
......@@ -51,7 +51,7 @@ public class ClassificationImage extends ClassificationModel {
TabbedPanel pane) {
ResultPanel rpanel = null;
if (data instanceof ImageData) {
rpanel = new ImageResultPanel(session, result, this, ((ImageData) data));
rpanel = new ImageResultPanel(session, result, this, ((ImageData) data));//!!
} else {
rpanel = new ResultPanel(result, this);
}
......@@ -68,13 +68,14 @@ public class ClassificationImage extends ClassificationModel {
@Override
public void doOperationAfterClassification(Classification result) {
//setprogress final ?
/* Monitoring the operation */
result.setStatus("Step "+ (result.getProgressableList().size()+1) + "/" + (result.getProgressableList().size()+1) + " : Displaying result");
if (!result.isHybrid() && !(result instanceof ClassificationSAM4)) {
if (result.getTimeExec() != 0)
result.setTimeExec(ManagementFactory.getThreadMXBean()
.getCurrentThreadCpuTime());
this.results.add(result);
this.addResult(result, Messages.getString("ClassificationImage.1") + ResultPanel.nbResult++); //$NON-NLS-1$
this.addResult(result, Messages.getString("ClassificationImage.1") + ResultPanel.nbResult++); //$NON-NLS-1$ !!!
ResultPanel irp = (ResultPanel) this.tabbedPane.getTabAt(
this.tabbedPane.getTabCount() - 1).getContentComponent();
irp.historique.addInfosln(Messages.getString("ClassificationImage.2")); //$NON-NLS-1$
......
......@@ -200,7 +200,7 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
MainFrame.getInstance().getCurrentDataSession().addResultPanel(this);
this.result = classification.getClusteringResult();
this.clusterMap = new MultiResolutionClusterMap(this, imgData.getWidth(),
imgData.getHeight(), result.getClusterMap(false), this.result.getClusters());
imgData.getHeight(), result.getClusterMap(false), this.result.getClusters());//!!
this.classPanel.addTreeSelectionListener(this);
......
......@@ -137,7 +137,8 @@ public class DataPanel extends JPanel implements ChangeListener {
this.data = _data;
JPanel container = buildBody();
JScrollPane sp = new JScrollPane(container);
// JScrollPane sp = new JScrollPane(container);
JPanel sp = container;//no scroll bars for better visibility
JPanel dataPane = new JPanel(new BorderLayout());
// dataPane.setSize(700, 500);
dataPane.setPreferredSize(new Dimension(700,500));
......
......@@ -44,7 +44,6 @@ public class ClassificationFrame extends ClassificationModel {
ResultPanel rp = new ResultPanel(result, this);
rp.setName(name);
resultPanels.add(rp);
Tab tabResult = ClassificationModel.createTab(
result.getName(),
new ImageIcon(getClass().getResource(
......
......@@ -41,9 +41,13 @@ public class MultiResolutionClusterMap {
private void generateMaps(int[] map) {
int[][] newMap = new int[width][height];
double pas = 100./(height*width);
double progress = imageResultPanel.getClassification().getProgress()+pas;
for(int j = 0 ; j < height ; j++) {
for(int i = 0 ; i < width ; i++) {
newMap[i][j] = map[i + j*width];
progress+=pas;
imageResultPanel.getClassification().setProgress((int)progress);
}
}
this.maps.add(newMap);
......
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