Commit 645e82ae authored by lafabregue's avatar lafabregue

Add the constraints creation tool in the toolbar

parent 74d5ac3e
......@@ -13,6 +13,9 @@ import jcl.jcld.database.SSHParameters;
import mustic.gui.panels.*;
import mustic.gui.segmentation.SegmentationPanel;
import mustic.io.RawImage;
import net.infonode.tabbedpanel.TabFactory;
import net.infonode.tabbedpanel.TabbedPanel;
import net.infonode.tabbedpanel.titledtab.TitledTab;
/**
* Classe qui a toutes les donnees concernant l'image ouverte .... - RawImage - ImageData -
......@@ -51,7 +54,7 @@ public class ImageSession {
public String mTitle;
/** Contains image, classifier, results */
protected JPanel mWorskSpace;
protected TabbedPanel mWorskSpace;
/** The Data que decrit une imqge */
private RawImage rawImage;
......@@ -63,7 +66,7 @@ public class ImageSession {
public SSHParameters sshparameters = null;
/** enable the image to display the image or not, for a memory usage matter */
private boolean displayEnable = false;
private boolean displayEnable = true;
/**
* @param aImage
......@@ -117,10 +120,16 @@ public class ImageSession {
if (MainFrame.DEBUG_MODE)
System.out.println(Messages.getString("ImageSession.6")); //$NON-NLS-1$
this.mWorskSpace = new JPanel();
this.mWorskSpace = new TabbedPanel();
JScrollPane sp = new JScrollPane(this.mImagePanel);
mWorskSpace = new JPanel(new BorderLayout());
mWorskSpace.add(sp, BorderLayout.CENTER);
final TitledTab tabImage = TabFactory.createTitledTab(
"Image",
new ImageIcon(getClass().getResource(
"/icons/mimetypes/image-x-generic.png")),
sp);
// mWorskSpace = new JPanel(new BorderLayout());
mWorskSpace.addTab(tabImage);
}
......@@ -214,7 +223,7 @@ public class ImageSession {
return this.segPanels;
}
public JPanel getWorkSpace() {
public TabbedPanel getWorkSpace() {
return this.mWorskSpace;
}
......
......@@ -27,6 +27,7 @@ import jcl.learning.methods.monostrategy.SingleClassification;
import jcl.weights.ClassificationWeights;
import jsl.Segmentation;
import mustic.gui.dialog.*;
import mustic.gui.dialog.classifier.ConstraintsSelectionDialog;
import mustic.gui.dialog.consoleHandler.ConsoleFrame;
import mustic.gui.panels.*;
import mustic.gui.panels.data.DataConstructFrame;
......@@ -568,7 +569,17 @@ public class MainFrame extends JFrame {
}
});
toolsMenu.add(menuTransformationBmp);
/** Menu to generate constraints from current image session */
menuConstraints = new JMenuItem(Messages.getString("MainFrame.301"));
menuConstraints.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
createConstraints();
}
});
toolsMenu.add(menuConstraints);
menuBar.add(toolsMenu);
ArffMenu = new JMenu(Messages.getString("MainFrame.32")); //$NON-NLS-1$
......@@ -963,6 +974,8 @@ public class MainFrame extends JFrame {
private Boolean actionCrop;
private JMenuItem menuTransformationBmp;
private Boolean actionTransformationBmp;
private JMenuItem menuConstraints;
private Boolean actionConstraints;
private JMenuItem menuItemArff;
private Boolean actionArff;
private JMenuItem menuItemRaw;
......@@ -1073,6 +1086,7 @@ public class MainFrame extends JFrame {
this.actionContrastM = false;
this.actionContratsP = false;
this.actionCrop = false;
this.actionConstraints = false;
this.actionFilter = false;
this.actionMask = false;
this.actionRefresh = false;
......@@ -1102,6 +1116,7 @@ public class MainFrame extends JFrame {
this.actionContrastM = true;
this.actionContratsP = true;
this.actionCrop = true;
this.actionConstraints = true;
this.actionFilter = true;
this.actionMask = true;
this.actionNew = true;
......@@ -1139,6 +1154,7 @@ public class MainFrame extends JFrame {
menuItemRoiColor.setEnabled(this.actionRoiColor);
menuItemMask.setEnabled(this.actionMask);
menuCrop.setEnabled(this.actionCrop);
menuConstraints.setEnabled(this.actionConstraints);
menuTransformationBmp.setEnabled(this.actionTransformationBmp);
menuItemArff.setEnabled(this.actionArff);
menuItemRaw.setEnabled(this.actionRaw);
......@@ -1198,6 +1214,7 @@ public class MainFrame extends JFrame {
menuItemMask.setText(Messages.getString("MainFrame.29"));
menuCrop.setText(Messages.getString("MainFrame.0"));
menuTransformationBmp.setText(Messages.getString("MainFrame.30"));
menuConstraints.setText(Messages.getString("MainFrame.301"));
menuItemArff.setText(Messages.getString("MainFrame.33"));
menuItemRaw.setText("RawImage to Arff");
menuItemLoadArff.setText(Messages.getString("MainFrame.34"));
......@@ -2111,6 +2128,21 @@ public class MainFrame extends JFrame {
JOptionPane.WARNING_MESSAGE);
}
}
/**
* Launch the dialog panel to create constraints
*/
protected void createConstraints() {
try {
ConstraintsSelectionDialog dialog = new ConstraintsSelectionDialog();
dialog.setImage(this.currentImageSession.getRawImage());
MainFrame.getInstance().getDesktop().addFrame(dialog);
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, Messages.getString("MainFrame.128"), Messages.getString("MainFrame.129"), //$NON-NLS-1$ //$NON-NLS-2$
JOptionPane.WARNING_MESSAGE);
}
}
public void doAfterSegmentation(Segmentation seg, RawImage img) {
// fenetre et panel du resultat
......@@ -3271,8 +3303,15 @@ public class MainFrame extends JFrame {
}
});
tab.setHighlightedStateTitleComponent(closeButton);
MainFrame.getInstance().getCurrentSession().getWorkSpace().addTab(tab);
//MainFrame.getInstance().getCurrentImageSession().getWorkSpace().addTab(tab);
final TitledTab tabSegmentation = TabFactory.createTitledTab(
"Segementation",
new ImageIcon(getClass().getResource(
"/icons/outlines.png")),
sp);
// mWorskSpace = new JPanel(new BorderLayout());
this.currentImageSession.getWorkSpace().addTab(tabSegmentation);
this.currentImageSession.getWorkSpace().setSelectedTab(this.currentImageSession.getWorkSpace()
.getTabAt(this.currentImageSession.getWorkSpace().getTabCount() - 1));
}
......
......@@ -612,7 +612,7 @@ public class PanneauAffichageParam extends JPanel {
//GridBagLayout layout = new GridBagLayout();
//this.setLayout(layout);
for (int index = 0; index < _attributes.getLength(); index++) { // on parcourt la liste des attributs
String attribut = _attributes.getLocalName(index);
String attribut = _attributes.getQName(index);
switch (attribut)
{
case "methode":
......
......@@ -26,6 +26,7 @@ import javax.swing.JSpinner;
import javax.swing.JTextField;
import mustic.gui.DesktopFrame;
import mustic.gui.ImageDesktopFrame;
import mustic.gui.MainFrame;
import mustic.io.RawImage;
......@@ -55,8 +56,8 @@ public class ImageToArffDialog extends JInternalFrame {
JPanel panelData = new JPanel(new GridLayout(4, 2));
panelData.add(new JLabel(Messages.getString("ImageToArffDialog.0"))); //$NON-NLS-1$
DesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
.getAllDesktopFrames();
ImageDesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
.getAllImageDesktopFrames();
int nbSession = desktopFrames.length;
for (int i = 0; i < nbSession; i++) {
String path = desktopFrames[i].getImageSession().getRawImage()
......@@ -79,12 +80,12 @@ public class ImageToArffDialog extends JInternalFrame {
if (ImageToArffDialog.this.comboImage.getSelectedIndex() == ImageToArffDialog.this.comboImage
.getItemCount() - 1) {
int nbSession = MainFrame.getInstance().getDesktop()
.getAllDesktopFrames().length;
.getAllImageDesktopFrames().length;
System.out.println(Messages.getString("ImageToArffDialog.6") //$NON-NLS-1$
+ nbSession);
MainFrame.getInstance().openNewFile();
DesktopFrame[] desktopFrames = MainFrame.getInstance()
.getDesktop().getAllDesktopFrames();
ImageDesktopFrame[] desktopFrames = MainFrame.getInstance()
.getDesktop().getAllImageDesktopFrames();
System.out.println(Messages.getString("ImageToArffDialog.7") //$NON-NLS-1$
+ desktopFrames.length);
if (MainFrame.getInstance().getDesktop()
......@@ -123,8 +124,8 @@ public class ImageToArffDialog extends JInternalFrame {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
DesktopFrame[] desktopFrames = MainFrame.getInstance()
.getDesktop().getAllDesktopFrames();
ImageDesktopFrame[] desktopFrames = MainFrame.getInstance()
.getDesktop().getAllImageDesktopFrames();
int nbSessions = desktopFrames.length;
if (nbSessions > 0) {
String path = desktopFrames[comboImage.getSelectedIndex()]
......@@ -191,8 +192,8 @@ public class ImageToArffDialog extends JInternalFrame {
* lance la création du fichier arff
*/
protected void buttonOk_actionPerformed() {
DesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
.getAllDesktopFrames();
ImageDesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
.getAllImageDesktopFrames();
int nbSessions = desktopFrames.length;
if (nbSessions == 0) {
JOptionPane.showMessageDialog(this,
......
......@@ -26,7 +26,6 @@ import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import mustic.gui.MainFrame;
import mustic.gui.panels.classifier.ClassifierPanel;
import mustic.io.RawImage;
......@@ -194,8 +193,8 @@ public class KMeansSeedSelectionDialog extends JInternalFrame {
return this.pixels;
}
public void setImage(int selectedIndex) {
RawImage img = MainFrame.getInstance().getDesktop().getAllImageDesktopFrames()[selectedIndex].getImageSession().getRawImage();
public void setImage(RawImage img) {
//RawImage img = MainFrame.getInstance().getDesktop().getAllImageDesktopFrames()[selectedIndex].getImageSession().getRawImage();
if (this.image!=null && !this.image.getPath().equals(img.getPath()))
this.clear();
this.width = img.getWidth();
......@@ -227,19 +226,31 @@ public class KMeansSeedSelectionDialog extends JInternalFrame {
* the data values must be between 0 and 255 to be valid,
* so let's convert them if needed
*/
for (int b = 0; b < img.getNbBands(); b++) {
int[] bands = new int[3];
bands[0] = img.r;
bands[1] = img.g;
bands[2] = img.b;
// we use at most 3 bands
int nbUsedBand = img.getNbBands();
if (nbUsedBand > 3) {
nbUsedBand = 3;
}
for (int b = 0; b < nbUsedBand; b++) {
int i = bands[b];
for (int x = 0; x < data[0].length; x++) {
for (int y = 0; y < data[0][0].length; y++) {
if (data[b][x][y] > 0) {
if (data[i][x][y] > 0) {
// convert only if needed to avoid color deformation on 8 bits images
if (max[b] <= 255 && min[b] >= 0) {
dataView[b][x][y] = (short) data[b][x][y];
if (max[i] <= 255 && min[b] >= 0) {
dataView[i][x][y] = (short) data[b][x][y];
} else {
dataView[b][x][y] = (short) (255
* (data[b][x][y] - min[b]) / (max[b] - min[b]));
dataView[i][x][y] = (short) (255
* (data[i][x][y] - min[b]) / (max[b] - min[b]));
}
} else {
dataView[b][x][y] = 0;
dataView[i][x][y] = 0;
}
}
}
......@@ -249,8 +260,8 @@ public class KMeansSeedSelectionDialog extends JInternalFrame {
for (int y = 0; y < values[0].length; y++) {
int pixel = (int) values[x][y] << 24
| dataView[0][x][y] << 16 | dataView[1][x][y] << 8
| dataView[2][x][y];
| dataView[bands[0]][x][y] << 16 | dataView[bands[1]][x][y] << 8
| dataView[bands[2]][x][y];
imageSource.setRGB(x, y, pixel);
imagePoints.setRGB(x, y, pixel);
......
......@@ -26,3 +26,21 @@ KMeansSeedSelectionDialog.29=Zoom level is at it's minimum...
KMeansSeedSelectionDialog.5=OK
KMeansSeedSelectionDialog.7=Image
KMeansSeedSelectionDialog.8=K-means seeds
ConstraintsSelectionDialog.0=Information
ConstraintsSelectionDialog.10=Must-Link
ConstraintsSelectionDialog.11=Cannot-Link
ConstraintsSelectionDialog.12=Label
ConstraintsSelectionDialog.13=Add
ConstraintsSelectionDialog.15=pixel
ConstraintsSelectionDialog.21=Apply
ConstraintsSelectionDialog.22=Refresh
ConstraintsSelectionDialog.29=Zoom level at minimum ...
ConstraintsSelectionDialog.30=index(es)
ConstraintsSelectionDialog.31=Remove
ConstraintsSelectionDialog.50=OK
ConstraintsSelectionDialog.51=Import
ConstraintsSelectionDialog.52=Export
ConstraintsSelectionDialog.53=Unknown file format for import
ConstraintsSelectionDialog.54=Error
ConstraintsSelectionDialog.7=Image
ConstraintsSelectionDialog.8=Constraint selection
......@@ -26,3 +26,21 @@ KMeansSeedSelectionDialog.29=Niveau de zoom est
KMeansSeedSelectionDialog.5=OK
KMeansSeedSelectionDialog.7=Image
KMeansSeedSelectionDialog.8=K-moyens graines
ConstraintsSelectionDialog.0=Information
ConstraintsSelectionDialog.10=Must-Link
ConstraintsSelectionDialog.11=Cannot-Link
ConstraintsSelectionDialog.12=Label
ConstraintsSelectionDialog.13=Ajouter
ConstraintsSelectionDialog.15=pixel
ConstraintsSelectionDialog.21=Appliquer
ConstraintsSelectionDialog.22=Rafraichir
ConstraintsSelectionDialog.29=Niveau de zoom est son minimum....
ConstraintsSelectionDialog.30=index(es)
ConstraintsSelectionDialog.31=Supr.
ConstraintsSelectionDialog.50=OK
ConstraintsSelectionDialog.51=Importer
ConstraintsSelectionDialog.52=Exporter
ConstraintsSelectionDialog.53=Format de fichier inconnu lors de l'import
ConstraintsSelectionDialog.54=Erreur
ConstraintsSelectionDialog.7=Image
ConstraintsSelectionDialog.8=Slection des contraintes
......@@ -158,6 +158,7 @@ MainFrame.28=Warning
MainFrame.29=Apply mask...
MainFrame.3=nb sessions
MainFrame.30=Create a sub-image...
MainFrame.301=Constraints
MainFrame.31=TransformationBmpToRoi...
MainFrame.32=Image/ARFF
MainFrame.33=Image to ARFF...
......
......@@ -158,6 +158,7 @@ MainFrame.28=Avertissement
MainFrame.29=Appliquer le masque...
MainFrame.3=nb sessions
MainFrame.30=Crer un sous-image...
MainFrame.301=Contraintes
MainFrame.31=TransformationBmpEnRoi...
MainFrame.32=Image/ARFF
MainFrame.33=Image en ARFF...
......
......@@ -53,7 +53,7 @@ public class BirdViewPanel extends JPanel implements MouseListener,
private int action = BirdViewPanel.ACT_NONE;
/** Blue value */
int b = 0;
int b = 0;
private BufferedImage bImage;
......
......@@ -146,14 +146,12 @@ public class ImagePanel extends JPanel {
// this.mBirdPanel = new BirdViewPanel(aImage, this, this.mInfoPanel);
final JPopupMenu popupMenu = new JPopupMenu();
JMenuItem menuClustering = new JMenuItem("Clustering...");
JMenuItem menuSeg = new JMenuItem("Segmentation...");
JMenuItem menuROI = new JMenuItem("ROI tools...");
JMenuItem menuResult = new JMenuItem("Open result...");
JMenuItem menuInfo = new JMenuItem("Image properties...");
JMenuItem menuClose = new JMenuItem("Close");
popupMenu.add(menuClustering);
popupMenu.add(menuSeg);
popupMenu.add(menuROI);
popupMenu.add(menuResult);
......@@ -179,24 +177,6 @@ public class ImagePanel extends JPanel {
}
});
menuClustering.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (!ClassificationFrame.isCreated()) {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
ClassificationFrame cf = ClassificationFrame.getInstance();
MainFrame.getInstance().getDesktop().addFrame(cf);
cf.moveToFront();
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
else {
// JOptionPane.showMessageDialog(null,
// "Une fenêtre est déjà ouverte !!!");
ClassificationFrame.getInstance().moveToFront();
}
}
});
menuSeg.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
......
......@@ -613,23 +613,23 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
MainFrame.getInstance().getCurrentDataSession().addResultPanel(this);
this.result = classification.getClusteringResult();
//TODO remove comments to allow display again
// this.colored = new BufferedImage(imgData.getResultWidth(), imgData.getResultHeight(), BufferedImage.TYPE_INT_RGB);
// if (imgData.getAssociatedImageSessions() != null && imgData.getAssociatedImageSessions().size() > 0) {
// this.setData(imgData.getAssociatedImageSessions().get(0).getImagePanel().getImage());
// } else {
// this.setData(new BufferedImage(imgData.getWidth(), imgData.getHeight(), BufferedImage.TYPE_INT_RGB));
// }
this.colored = new BufferedImage(imgData.getResultWidth(), imgData.getResultHeight(), BufferedImage.TYPE_INT_RGB);
if (imgData.getAssociatedImageSessions() != null && imgData.getAssociatedImageSessions().size() > 0) {
this.setData(imgData.getAssociatedImageSessions().get(0).getImagePanel().getImage());
} else {
this.setData(new BufferedImage(imgData.getWidth(), imgData.getHeight(), BufferedImage.TYPE_INT_RGB));
}
this.classPanel.addTreeSelectionListener(this);
setListener();
setListenerImage();
if (MainFrame.DEBUG_MODE)
System.out.println("updateImageColors from irp");
//TODO remove comments to allow display again
// updateImageColors();
//
// if (imgData.getAssociatedImageSessions() != null && imgData.getAssociatedImageSessions().size() > 0) {
// imgData.getAssociatedImageSessions().get(0).getBirdViewPanel().syncImage(imgData.getAssociatedImageSessions().get(0));
// }
updateImageColors();
if (imgData.getAssociatedImageSessions() != null && imgData.getAssociatedImageSessions().size() > 0) {
imgData.getAssociatedImageSessions().get(0).getBirdViewPanel().syncImage(imgData.getAssociatedImageSessions().get(0));
}
this.resultTabbedPane.addTab("Image Result", this.panelImage);
this.resultTabbedPane.setSelectedComponent(this.panelImage);
......@@ -769,6 +769,8 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
for (int i = 0; i < result.length; i++) {
if (result[i]) {
ImageResultPanel imgPanel = (ImageResultPanel) this.classFrame
.tabbedPane.getTabAt(i).getContentComponent();
String name = "Result" + nbRes++;
/* Sauvegarde des diverses informations */
......@@ -778,7 +780,7 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
/** Sauvegarde de l'image couleur */
// retrieve image
BufferedImage bi = getFullColorImage();
BufferedImage bi = imgPanel.getFullColorImage();
File outputfile = new File("imageColor");
ImageIO.write(bi, "png", outputfile);
Packager.zipFile(out, name + "/imageColor.tif", outputfile);
......@@ -797,32 +799,32 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
out.putNextEntry(new ZipEntry(name + '/' + "ClusterMapFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.classification.getClusteringResult().getClusterMap(false));
oos.writeObject(imgPanel.classification.getClusteringResult().getClusterMap(false));
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "WeightsFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.result.getWeights());
oos.writeObject(imgPanel.result.getWeights());
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "MethodFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(classification.getLearningMethod());
oos.writeObject(imgPanel.classification.getLearningMethod());
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "DataFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.result.getData().getViewDataObjects());
oos.writeObject(imgPanel.result.getData().getViewDataObjects());
oos.flush();
out.closeEntry();
if (qualityPanel != null && qualityPanel.getQualities() != null) {
if (imgPanel.qualityPanel != null && imgPanel.qualityPanel.getQualities() != null) {
out.putNextEntry(new ZipEntry(name + '/' + "QualityFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(qualityPanel.getQualities());
oos.writeObject(imgPanel.qualityPanel.getQualities());
oos.flush();
out.closeEntry();
}
......@@ -853,6 +855,116 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
System.out.println("Enregistrement fini");
}
protected void save_actionPerformed() {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
JFileChooser fileChooser = new JFileChooser();
if (this.currentDirectory != null)
fileChooser.setCurrentDirectory(this.currentDirectory);
fileChooser.setDialogTitle("save " + this.classFrame.getTitle());
fileChooser.addChoosableFileFilter(new ZipFileFilter());
int returnVal = fileChooser.showSaveDialog(this);
int nbRes = 0;
if (returnVal == JFileChooser.APPROVE_OPTION) {
this.currentDirectory = fileChooser.getCurrentDirectory();
String path = fileChooser.getCurrentDirectory().getPath();
String nameFile = fileChooser.getSelectedFile().getName();
String separ = "";
if (path.lastIndexOf("\\") == -1) {
separ = "/";
}
else {
separ = "\\";
}
path += separ;
try {
String outFilename = path + nameFile;
if (!outFilename.endsWith(".zip"))
outFilename += ".zip";
ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
String name = "Result" + nbRes++;
/* Sauvegarde des diverses informations */
/** Sauvegarde de l'image d'origine */
//Packager.zipFile(out, name + "/imageOrigine.tif", new File(this.mRawImage.getFilename()));
/** Sauvegarde de l'image couleur */
// retrieve image
BufferedImage bi = this.getFullColorImage();
File outputfile = new File("imageColor");
ImageIO.write(bi, "png", outputfile);
Packager.zipFile(out, name + "/imageColor.tif", outputfile);
outputfile.delete();
out.closeEntry();
ObjectOutputStream oos;
/**
* Sauvegarde de ImageResultPanel complete
* @author Francois Petitjean
*/
// out.putNextEntry(new ZipEntry(name + '/' + "ClustersFull.ser"));
// oos = new ObjectOutputStream(out);
// oos.writeObject(this.result.getClusters());
// oos.flush();
// out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "ClusterMapFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.classification.getClusteringResult().getClusterMap(false));
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "WeightsFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.result.getWeights());
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "MethodFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.classification.getLearningMethod());
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "DataFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.result.getData().getViewDataObjects());
oos.flush();
out.closeEntry();
if (this.qualityPanel != null && this.qualityPanel.getQualities() != null) {
out.putNextEntry(new ZipEntry(name + '/' + "QualityFull.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(this.qualityPanel.getQualities());
oos.flush();
out.closeEntry();
}
out.putNextEntry(new ZipEntry(name + '/' + "ParameterMode.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(AttributeMultiDimSequence.getMode());
oos.flush();
out.closeEntry();
out.putNextEntry(new ZipEntry(name + '/' + "ParameterSimplify.ser"));
oos = new ObjectOutputStream(out);
oos.writeObject(AttributeMultiDimSequence.getSimplifyFrom());
oos.flush();
out.closeEntry();
out.close();
} catch (SVGGraphics2DIOException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}