Commit 2324f382 authored by lafabregue's avatar lafabregue

fix merge with new constrained samarah

parents 33a0b68d bd1cc665
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,6 +23,9 @@ import jcl.data.Data; ...@@ -23,6 +23,9 @@ import jcl.data.Data;
import jcl.data.DataObject; import jcl.data.DataObject;
import jcl.data.SimpleData; import jcl.data.SimpleData;
import jcl.data.attribute.AttributeMultiDimSequence; import jcl.data.attribute.AttributeMultiDimSequence;
import jcl.data.distance.DistanceModel;
import jcl.data.distance.DistanceParameter;
import jcl.weights.GlobalWeights;
import mustic.gui.MainFrame; import mustic.gui.MainFrame;
import mustic.gui.dialog.Messages; import mustic.gui.dialog.Messages;
import mustic.gui.dialog.SequenceDialog; import mustic.gui.dialog.SequenceDialog;
...@@ -138,7 +141,7 @@ public class ArffToDataDialog extends JInternalFrame implements ToUpdateObject { ...@@ -138,7 +141,7 @@ public class ArffToDataDialog extends JInternalFrame implements ToUpdateObject {
} }
} }
@SuppressWarnings({ "unchecked", "deprecation" }) @SuppressWarnings({ "unchecked" })
protected void buttonOk_actionPerformed() { protected void buttonOk_actionPerformed() {
try { try {
Object[] result = DataArffExchange.arffToData(this.textFile.getText()); Object[] result = DataArffExchange.arffToData(this.textFile.getText());
...@@ -212,16 +215,23 @@ public class ArffToDataDialog extends JInternalFrame implements ToUpdateObject { ...@@ -212,16 +215,23 @@ public class ArffToDataDialog extends JInternalFrame implements ToUpdateObject {
// test if we have one or multiples images // test if we have one or multiples images
if (sequenceFiles.size() > 1) { if (sequenceFiles.size() > 1) {
data = new ImageData(new ImportedImageSampler(sequenceFilesPath, data = new ImageData(new ImportedImageSampler(sequenceFilesPath,
(List<DataObject>) result[1], (List<Integer>) result[0]), sequenceFiles); (List<DataObject>) result[1], (List<Integer>) result[0]), sequenceFiles, null, null);
} else { } else {
data = new ImageData(new ImportedImageSampler(sequenceFilesPath.get(0), data = new ImageData(new ImportedImageSampler(sequenceFilesPath.get(0),
(List<DataObject>) result[1], (List<Integer>) result[0]), sequenceFiles.get(0)); (List<DataObject>) result[1], (List<Integer>) result[0]), sequenceFiles.get(0),
null, null);
} }
} else { } else {
// if no images is associated we create a SimpleData // if no images is associated we create a SimpleData
data = new SimpleData((List<DataObject>) result[1]); data = new SimpleData((List<DataObject>) result[1], null, null);
} }
DistanceModel distanceModel = DistanceModel.generateDefaultModel(
data.getOneDataObject(), new GlobalWeights(data.getOneDataObject()));
DistanceParameter[][] distanceParameters = DistanceModel
.generateDefaultDistanceParameters(1, distanceModel, data);
data.setDistanceModel(distanceModel, distanceParameters);
if (this.textData.getText().length() == 0) { if (this.textData.getText().length() == 0) {
this.textData.setText(DataArffExchange.getRelationName(this.textFile.getText())); this.textData.setText(DataArffExchange.getRelationName(this.textFile.getText()));
......
...@@ -56,6 +56,9 @@ import jcl.clustering.constraints.LabelConstraint; ...@@ -56,6 +56,9 @@ import jcl.clustering.constraints.LabelConstraint;
import jcl.clustering.constraints.MustLinkConstraint; import jcl.clustering.constraints.MustLinkConstraint;
import jcl.clustering.constraints.NbClusterConstraint; import jcl.clustering.constraints.NbClusterConstraint;
import jcl.data.Data; import jcl.data.Data;
import jcl.data.distance.DistanceModel;
import jcl.data.distance.DistanceParameter;
import jcl.weights.GlobalWeights;
import mustic.utils.image.ImageAddOn; import mustic.utils.image.ImageAddOn;
import mustic.utils.image.ImageDisplayer; import mustic.utils.image.ImageDisplayer;
import mustic.utils.tools.ProgressPropertyChangeListener; import mustic.utils.tools.ProgressPropertyChangeListener;
...@@ -161,11 +164,15 @@ public class ConstraintsSelectionFrame extends JFrame implements ImageAddOn { ...@@ -161,11 +164,15 @@ public class ConstraintsSelectionFrame extends JFrame implements ImageAddOn {
this.imageDisplayer = imgDisplayer; this.imageDisplayer = imgDisplayer;
this.constraintsContainer = constraintsContainer; this.constraintsContainer = constraintsContainer;
if (data != null) { if (data != null) {
// case of Data provided // case of Data provided
minDistance = data.getEstimatedMinDistance(); DistanceModel model = DistanceModel.generateDefaultModel(data.getOneDataObject(),
maxDistance = data.getEstimatedMaxDistance(); new GlobalWeights(data.getOneDataObject()));
DistanceParameter[][] parameters = DistanceModel.generateDefaultDistanceParameters(1,model, data);
minDistance = data.getEstimatedMinDistance(model, parameters[0]);
maxDistance = data.getEstimatedMaxDistance(model, parameters[0]);
this.data = data; this.data = data;
} else { } else {
// otherwise we base our estimation on the image // otherwise we base our estimation on the image
......
...@@ -24,6 +24,9 @@ import jcl.data.Data; ...@@ -24,6 +24,9 @@ import jcl.data.Data;
import jcl.data.DataObject; import jcl.data.DataObject;
import jcl.data.SimpleData; import jcl.data.SimpleData;
import jcl.data.attribute.AttributeMultiDimSequence; import jcl.data.attribute.AttributeMultiDimSequence;
import jcl.data.distance.DistanceModel;
import jcl.data.distance.DistanceParameter;
import jcl.weights.GlobalWeights;
import multiCube.tools.image.ImageHelper; import multiCube.tools.image.ImageHelper;
import mustic.gui.MainFrame; import mustic.gui.MainFrame;
import mustic.gui.dialog.Messages; import mustic.gui.dialog.Messages;
...@@ -140,7 +143,6 @@ public class CSVToDataDialog extends JInternalFrame implements ToUpdateObject { ...@@ -140,7 +143,6 @@ public class CSVToDataDialog extends JInternalFrame implements ToUpdateObject {
} }
} }
@SuppressWarnings({"deprecation"})
protected void buttonOk_actionPerformed() { protected void buttonOk_actionPerformed() {
try { try {
List<DataObject> result = new ArrayList<DataObject>(); List<DataObject> result = new ArrayList<DataObject>();
...@@ -160,7 +162,11 @@ public class CSVToDataDialog extends JInternalFrame implements ToUpdateObject { ...@@ -160,7 +162,11 @@ public class CSVToDataDialog extends JInternalFrame implements ToUpdateObject {
} }
if(result != null) { if(result != null) {
data = new SimpleData(result); data = new SimpleData(result, null, null);
DistanceModel model = DistanceModel.generateDefaultModel(data.getOneDataObject(),
new GlobalWeights(data.getOneDataObject()));
DistanceParameter[][] parameters = DistanceModel.generateDefaultDistanceParameters(1,model, data);
data.setDistanceModel(model, parameters);
if (this.textData.getText().length() == 0) { if (this.textData.getText().length() == 0) {
this.textData.setText(ImageHelper.extractFileName( this.textData.setText(ImageHelper.extractFileName(
......
package mustic.gui.dialog.csv;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import jcl.data.Data;
import jcl.data.DataObject;
import jcl.data.DistanceModel;
import jcl.data.SimpleData;
import jcl.data.attribute.AttributeMultiDimSequence;
<<<<<<< HEAD
import jcl.data.distance.DistanceParameter;
import jcl.weights.GlobalWeights;
=======
import multiCube.tools.image.ImageHelper;
>>>>>>> master
import mustic.gui.MainFrame;
import mustic.gui.dialog.Messages;
import mustic.utils.documentFilter.ToUpdateObject;
import mustic.utils.io.CSVUtils;
/**
* Dialog that allow the user to generate a Data from an arff file
*
* @author Baptiste LAFABREGUE
*
*/
public class CSVToDataDialog extends JInternalFrame implements ToUpdateObject {
private static final long serialVersionUID = 1L;
private JTextField textFile = new JTextField();
private JTextField textData = new JTextField();
private JTextField textSeparator = new JTextField();
public CSVToDataDialog() {
super();
JPanel mainPanel = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new GridLayout(3, 2));
JPanel pInpout = new JPanel(new BorderLayout());
panel.add(new JLabel(Messages.getString("CSVToDataDialog.0")), BorderLayout.WEST); //$NON-NLS-1$
pInpout.add(this.textFile, BorderLayout.CENTER);
this.textFile.addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
updateOutputName();
}
@Override
public void focusGained(FocusEvent e) {
}
});
JButton buttonBrowse = new JButton("..."); //$NON-NLS-1$
buttonBrowse.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
int returnVal = fileChooser
.showOpenDialog(CSVToDataDialog.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
CSVToDataDialog.this.textFile.setText(fileChooser
.getSelectedFile().getPath());
updateOutputName();
if (!fileChooser.getSelectedFile().getPath()
.endsWith(".csv")) { //$NON-NLS-1$
JOptionPane.showMessageDialog(CSVToDataDialog.this,
Messages.getString("CSVToDataDialog.3"), //$NON-NLS-1$
Messages.getString("CSVToDataDialog.4"), //$NON-NLS-1$
JOptionPane.WARNING_MESSAGE);
}
}
}
});
pInpout.add(buttonBrowse, BorderLayout.EAST);
panel.add(pInpout);
JPanel pSeparator = new JPanel(new BorderLayout());
panel.add(new JLabel(Messages.getString("CSVToDataDialog.2")), BorderLayout.WEST); //$NON-NLS-1$
pSeparator.add(this.textSeparator, BorderLayout.CENTER);
panel.add(pSeparator);
this.textSeparator.setText(";");
JPanel pOutpout = new JPanel(new BorderLayout());
panel.add(new JLabel(Messages.getString("CSVToDataDialog.5")), BorderLayout.WEST); //$NON-NLS-1$
pOutpout.add(this.textData, BorderLayout.CENTER);
panel.add(pOutpout);
this.textFile.setPreferredSize(new Dimension(200, 30));
JPanel panelButton = new JPanel();
JButton buttonOk = new JButton(Messages.getString("CSVToDataDialog.7")); //$NON-NLS-1$
panelButton.add(buttonOk);
buttonOk.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
buttonOk_actionPerformed();
}
});
mainPanel.add(panel, BorderLayout.NORTH);
mainPanel.add(panelButton, BorderLayout.SOUTH);
this.setContentPane(mainPanel);
this.setTitle(Messages.getString("CSVToDataDialog.8")); //$NON-NLS-1$
this.setSize(300, 180);
this.setResizable(true);
this.setMaximizable(true);
this.setIconifiable(true);
this.setClosable(true);
this.setVisible(true);
this.requestFocus();
}
private void updateOutputName() {
if (this.textData.getText() != null && this.textData.getText() != "") { //$NON-NLS-1$
// we don't update if there is already a value
return;
}
if (this.textFile.getText() != null && this.textFile.getText() != "") { //$NON-NLS-1$
this.textData.setText(ImageHelper.extractFileName(
ImageHelper.stripExtension(this.textData.getText())));
}
}
protected void buttonOk_actionPerformed() {
try {
List<DataObject> result = new ArrayList<DataObject>();
Data data = null;
CSVUtils reader = null;
try {
File file = new File(this.textFile.getText());
reader = new CSVUtils(file, this.textSeparator.getText().charAt(0));
List<String> line;
while((line = reader.readNext()) != null) {
extractObjectFromLine(result, line);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
result = null;
}
if(result != null) {
data = new SimpleData(result, null, null);
DistanceModel model = DistanceModel.generateDefaultModel(data.getOneDataObject(),
new GlobalWeights(data.getOneDataObject()));
DistanceParameter[][] parameters = DistanceModel.generateDefaultDistanceParameters(1,model, data);
data.setDistanceModel(model, parameters);
if (this.textData.getText().length() == 0) {
this.textData.setText(ImageHelper.extractFileName(
ImageHelper.stripExtension(this.textData.getText())));
}
data.setDataName(this.textData.getText());
MainFrame.getInstance().createDataSession(data);
JOptionPane.showMessageDialog(this,
Messages.getString("CSVToDataDialog.151") + this.textData.getText() //$NON-NLS-1$
+ " " + Messages.getString("CSVToDataDialog.152"), //$NON-NLS-1$
Messages.getString("CSVToDataDialog.16"), //$NON-NLS-1$
JOptionPane.INFORMATION_MESSAGE);
} else {
JOptionPane.showMessageDialog(this,
Messages.getString("CSVToDataDialog.41"), //$NON-NLS-1$
Messages.getString("CSVToDataDialog.4"), //$NON-NLS-1$
JOptionPane.WARNING_MESSAGE);
}
this.dispose();
} catch (Exception e) {
JOptionPane.showMessageDialog(this,
Messages.getString("CSVToDataDialog.41"), //$NON-NLS-1$
Messages.getString("CSVToDataDialog.4"), //$NON-NLS-1$
JOptionPane.WARNING_MESSAGE);
e.printStackTrace();
}
}
/**
* Construct a DataObject from a set of Strings and add it to a List
* @param list
* the list to add the DataObject to
* @param line
* the line to interpret
*/
private void extractObjectFromLine(List<DataObject> list, List<String> line) {
DataObject obj = new DataObject(1);
double[][] seq = new double[line.size()][];
for (int i = 0 ; i < line.size() ; i++) {
seq[i] = new double[1];
seq[i][0] = Double.parseDouble(line.get(i));
}
obj.setAttribute(0, new AttributeMultiDimSequence(seq));
list.add(obj);
}
@Override
public void update(String s) {
}
}
...@@ -21,6 +21,9 @@ import javax.swing.text.PlainDocument; ...@@ -21,6 +21,9 @@ import javax.swing.text.PlainDocument;
import jcl.data.Data; import jcl.data.Data;
import jcl.data.DataObject; import jcl.data.DataObject;
import jcl.data.SimpleData; import jcl.data.SimpleData;
import jcl.data.distance.DistanceModel;
import jcl.data.distance.DistanceParameter;
import jcl.weights.GlobalWeights;
import mustic.gui.MainFrame; import mustic.gui.MainFrame;
import mustic.gui.dialog.Messages; import mustic.gui.dialog.Messages;
import mustic.utils.documentFilter.BasicIntDocumentFilter; import mustic.utils.documentFilter.BasicIntDocumentFilter;
...@@ -158,7 +161,13 @@ public class OGRToDataDialog extends JInternalFrame implements ToUpdateObject { ...@@ -158,7 +161,13 @@ public class OGRToDataDialog extends JInternalFrame implements ToUpdateObject {
if(result != null) { if(result != null) {
data = new SimpleData(result); data = new SimpleData(result, null, null);
DistanceModel distanceModel = DistanceModel.generateDefaultModel(
data.getOneDataObject(), new GlobalWeights(data.getOneDataObject()));
DistanceParameter[][] distanceParameters = DistanceModel
.generateDefaultDistanceParameters(1, distanceModel, data);
data.setDistanceModel(distanceModel, distanceParameters);
data.setDataName(this.textData.getText()); data.setDataName(this.textData.getText());
MainFrame.getInstance().createDataSession(data); MainFrame.getInstance().createDataSession(data);
......
This diff is collapsed.
...@@ -4,8 +4,6 @@ import java.awt.*; ...@@ -4,8 +4,6 @@ import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.awt.image.*; import java.awt.image.*;
import java.io.*; import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Observable; import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import java.util.Vector; import java.util.Vector;
...@@ -949,10 +947,11 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen ...@@ -949,10 +947,11 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
*/ */
public void hClustering_actionPerformed(boolean newResult) { public void hClustering_actionPerformed(boolean newResult) {
try { try {
LearningParameters learningParameters = new ParametersAHC(null); LearningParameters learningParameters = new ParametersAHC(imgData.getDistanceModel(),
imgData.getDistanceParameters());
LearningMethod learningMethod = learningParameters.getLearningMethodInstance(); LearningMethod learningMethod = learningParameters.getLearningMethodInstance();
@SuppressWarnings("deprecation") Data classificationData = new SimpleData(this.result.getClusterCenters(),
Data classificationData = new SimpleData(this.result.getClusterCenters()); imgData.getDistanceModel(), imgData.getDistanceParameters());
LearningResult learningResult = learningMethod.learn(classificationData); LearningResult learningResult = learningMethod.learn(classificationData);
this.result.hierarchy = ((LearningResultAHC) learningResult).getHierarchy(); this.result.hierarchy = ((LearningResultAHC) learningResult).getHierarchy();
Classification classif = new SingleClassification("", classificationData, learningMethod, this.result); Classification classif = new SingleClassification("", classificationData, learningMethod, this.result);
...@@ -1199,12 +1198,6 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen ...@@ -1199,12 +1198,6 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
out.closeEntry(); 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")); out.putNextEntry(new ZipEntry(name + '/' + "ParameterSimplify.ser"));
oos = new ObjectOutputStream(out); oos = new ObjectOutputStream(out);
oos.writeObject(AttributeMultiDimSequence.getSimplifyFrom()); oos.writeObject(AttributeMultiDimSequence.getSimplifyFrom());
...@@ -1311,12 +1304,6 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen ...@@ -1311,12 +1304,6 @@ public class ImageResultPanel extends ResultPanel implements TreeSelectionListen
out.closeEntry(); 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")); out.putNextEntry(new ZipEntry(name + '/' + "ParameterSimplify.ser"));
oos = new ObjectOutputStream(out); oos = new ObjectOutputStream(out);
oos.writeObject(AttributeMultiDimSequence.getSimplifyFrom()); oos.writeObject(AttributeMultiDimSequence.getSimplifyFrom());
......
...@@ -5,7 +5,10 @@ import java.awt.event.ActionEvent; ...@@ -5,7 +5,10 @@ import java.awt.event.ActionEvent;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JLabel; import javax.swing.JLabel;
import jcl.data.distance.DistanceModel;
import jcl.data.distance.DistanceParameter;
import jcl.learning.LearningParameters; import jcl.learning.LearningParameters;
import jcl.weights.GlobalWeights;
import mustic.gui.ImageDesktopFrame; import mustic.gui.ImageDesktopFrame;
import mustic.gui.MainFrame; import mustic.gui.MainFrame;
import mustic.io.ImageData; import mustic.io.ImageData;
...@@ -79,7 +82,13 @@ class RemoteSensingClassifierDialog extends ClassifierDialog { ...@@ -79,7 +82,13 @@ class RemoteSensingClassifierDialog extends ClassifierDialog {
if (this.bidouille == null) { if (this.bidouille == null) {
img = MainFrame.getInstance().getDesktop().getAllImageDesktopFrames()[this.dataBox img = MainFrame.getInstance().getDesktop().getAllImageDesktopFrames()[this.dataBox
.getSelectedIndex()].getImageSession().getRawImage(); .getSelectedIndex()].getImageSession().getRawImage();
this.bidouille = new ImageData(img); this.bidouille = new ImageData(img, null, null);
DistanceModel distanceModel = DistanceModel.generateDefaultModel(
this.bidouille.getOneDataObject(), new GlobalWeights(this.bidouille.getOneDataObject()));
DistanceParameter[][] distanceParameters = DistanceModel
.generateDefaultDistanceParameters(1, distanceModel, this.bidouille);
this.bidouille.setDistanceModel(distanceModel, distanceParameters);
} }
LearningParameters params = this.classifiersPanel LearningParameters params = this.classifiersPanel
......
...@@ -20,6 +20,7 @@ import jcl.learning.methods.monostrategy.som.ParametersSOM; ...@@ -20,6 +20,7 @@ import jcl.learning.methods.monostrategy.som.ParametersSOM;
import jcl.weights.ClassificationWeights; import jcl.weights.ClassificationWeights;
import jcl.weights.GlobalWeights; import jcl.weights.GlobalWeights;
import jcl.weights.Weights; import jcl.weights.Weights;
import mustic.gui.DataDesktopFrame;
import mustic.gui.DesktopFrame; import mustic.gui.DesktopFrame;
import mustic.gui.ImageDesktopFrame; import mustic.gui.ImageDesktopFrame;
import mustic.gui.MainFrame; import mustic.gui.MainFrame;
...@@ -861,52 +862,52 @@ public class ClassifierHandler extends DefaultHandler { ...@@ -861,52 +862,52 @@ public class ClassifierHandler extends DefaultHandler {
} else if (qName.equals("InitMethod")) { //$NON-NLS-1$ } else if (qName.equals("InitMethod")) { //$NON-NLS-1$
Data data = null; Data data = null;
DesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop() DataDesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
.getAllDesktopFrames(); .getAllDataDesktopFrames();
int nbSessions = desktopFrames.length; int nbSessions = desktopFrames.length;
for (int i = 0; i < nbSessions; i++) { for (int i = 0; i < nbSessions; i++) {
if (this.listData.get(0).equals( if (this.listData.get(0).equals(
desktopFrames[i].getImageSession().getRawImage() desktopFrames[i].getDataSession().getAssociatedImageSessions().get(0)
.getPath())) { .getRawImage().getPath())) {
data = desktopFrames[i].getImageSession().getImageData(); data = desktopFrames[i].getDataSession().getData();
break; break;
} }
} }
if (data == null) { if (data == null) {
File f = new File(this.listData.get(0)); File f = new File(this.listData.get(0));
try { try {
MainFrame.getInstance().createSession( MainFrame.getInstance().createImageSession(
MainFrame.getInstance().open(f), null); MainFrame.getInstance().open(f), null);
if (MainFrame.getInstance().getCurrentSession() if (MainFrame.getInstance().getCurrentImageSession()
.getRawImage().getNbBands() > 1) { .getRawImage().getNbBands() > 1) {
MainFrame.getInstance().getCurrentSession() MainFrame.getInstance().getCurrentImageSession()
.getBirdViewPanel().setR(0); .getBirdViewPanel().setR(0);
MainFrame.getInstance().getCurrentSession() MainFrame.getInstance().getCurrentImageSession()
.getBirdViewPanel().setG(1); .getBirdViewPanel().setG(1);
MainFrame.getInstance().getCurrentSession() MainFrame.getInstance().getCurrentImageSession()
.getBirdViewPanel().setB(2); .getBirdViewPanel().setB(2);
MainFrame MainFrame
.getInstance() .getInstance()
.getCurrentSession() .getCurrentImageSession()
.getBirdViewPanel() .getBirdViewPanel()
.syncImage( .syncImage(
MainFrame.getInstance() MainFrame.getInstance()
.getCurrentSession()); .getCurrentImageSession());
PictureTool.setR(MainFrame.getInstance() PictureTool.setR(MainFrame.getInstance()
.getCurrentSession().getRawImage() .getCurrentImageSession().getRawImage()