Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MultiCube
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lafabregue
MultiCube
Commits
b4beb7d2
Commit
b4beb7d2
authored
Oct 02, 2017
by
lafabregue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tmp commit
parent
8fa09c81
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
888 additions
and
564 deletions
+888
-564
resources/icons/match_colors.png
resources/icons/match_colors.png
+0
-0
src/mustic/gui/ClassificationImage.java
src/mustic/gui/ClassificationImage.java
+10
-5
src/mustic/gui/DataSession.java
src/mustic/gui/DataSession.java
+135
-12
src/mustic/gui/MainFrame.java
src/mustic/gui/MainFrame.java
+40
-37
src/mustic/gui/dialog/CropDialog.java
src/mustic/gui/dialog/CropDialog.java
+3
-27
src/mustic/gui/panels/BirdViewPanel.java
src/mustic/gui/panels/BirdViewPanel.java
+53
-27
src/mustic/gui/panels/ImageInformationPanel.java
src/mustic/gui/panels/ImageInformationPanel.java
+3
-3
src/mustic/gui/panels/ImagePanel.java
src/mustic/gui/panels/ImagePanel.java
+182
-149
src/mustic/gui/panels/ImageResultPanel.java
src/mustic/gui/panels/ImageResultPanel.java
+46
-45
src/mustic/gui/panels/classifier/ClassifierPanel.java
src/mustic/gui/panels/classifier/ClassifierPanel.java
+26
-66
src/mustic/gui/panels/classifier/components/NhybridClassificationPanel.java
...els/classifier/components/NhybridClassificationPanel.java
+5
-3
src/mustic/gui/panels/data/DataPanel.java
src/mustic/gui/panels/data/DataPanel.java
+14
-7
src/mustic/gui/segmentation/SegmentationPanelResultatImage.java
...stic/gui/segmentation/SegmentationPanelResultatImage.java
+8
-4
src/mustic/io/RawImage.java
src/mustic/io/RawImage.java
+38
-44
src/mustic/models/gui/ClassificationFrame.java
src/mustic/models/gui/ClassificationFrame.java
+1
-0
src/mustic/models/gui/ClassificationModel.java
src/mustic/models/gui/ClassificationModel.java
+37
-37
src/mustic/models/gui/panels/ClassConfigPanel.java
src/mustic/models/gui/panels/ClassConfigPanel.java
+177
-72
src/mustic/models/gui/panels/ResultPanel.java
src/mustic/models/gui/panels/ResultPanel.java
+47
-15
src/mustic/utils/image/BufferedImageHelper.java
src/mustic/utils/image/BufferedImageHelper.java
+1
-1
src/mustic/utils/image/ClusteringImageViewer.java
src/mustic/utils/image/ClusteringImageViewer.java
+1
-1
src/mustic/utils/image/ImageViewer.java
src/mustic/utils/image/ImageViewer.java
+4
-2
src/mustic/utils/image/MultiResolutionClusterMap.java
src/mustic/utils/image/MultiResolutionClusterMap.java
+13
-3
src/mustic/utils/image/PyramidImageViewer.java
src/mustic/utils/image/PyramidImageViewer.java
+23
-4
src/mustic/utils/io/tiff/TiffUtils.java
src/mustic/utils/io/tiff/TiffUtils.java
+21
-0
No files found.
resources/icons/match_colors.png
0 → 100644
View file @
b4beb7d2
995 Bytes
src/mustic/gui/ClassificationImage.java
View file @
b4beb7d2
...
@@ -21,6 +21,8 @@ import net.infonode.tabbedpanel.TabbedPanel;
...
@@ -21,6 +21,8 @@ import net.infonode.tabbedpanel.TabbedPanel;
public
class
ClassificationImage
extends
ClassificationModel
{
public
class
ClassificationImage
extends
ClassificationModel
{
/** */
/** */
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
DataSession
session
=
null
;
/** */
/** */
...
@@ -32,14 +34,16 @@ public class ClassificationImage extends ClassificationModel {
...
@@ -32,14 +34,16 @@ public class ClassificationImage extends ClassificationModel {
* @param data
* @param data
* @param title
* @param title
*/
*/
public
ClassificationImage
(
Data
data
,
String
title
)
{
public
ClassificationImage
(
Data
Session
session
,
String
title
)
{
super
(
data
,
title
,
false
);
super
(
session
.
getData
()
,
title
,
false
);
this
.
setDefaultCloseOperation
(
WindowConstants
.
DISPOSE_ON_CLOSE
);
this
.
setDefaultCloseOperation
(
WindowConstants
.
DISPOSE_ON_CLOSE
);
this
.
session
=
session
;
}
}
public
ClassificationImage
(
Data
data
,
String
title
,
boolean
justData
)
{
public
ClassificationImage
(
Data
Session
session
,
String
title
,
boolean
justData
)
{
super
(
data
,
title
,
justData
);
super
(
session
.
getData
()
,
title
,
justData
);
this
.
setDefaultCloseOperation
(
WindowConstants
.
DISPOSE_ON_CLOSE
);
this
.
setDefaultCloseOperation
(
WindowConstants
.
DISPOSE_ON_CLOSE
);
this
.
session
=
session
;
}
}
/**
/**
...
@@ -55,10 +59,11 @@ public class ClassificationImage extends ClassificationModel {
...
@@ -55,10 +59,11 @@ public class ClassificationImage extends ClassificationModel {
TabbedPanel
pane
)
{
TabbedPanel
pane
)
{
ResultPanel
rpanel
=
null
;
ResultPanel
rpanel
=
null
;
if
(
data
instanceof
ImageData
)
{
if
(
data
instanceof
ImageData
)
{
rpanel
=
new
ImageResultPanel
(
result
,
this
,
((
ImageData
)
data
));
rpanel
=
new
ImageResultPanel
(
session
,
result
,
this
,
((
ImageData
)
data
));
}
else
{
}
else
{
rpanel
=
new
ResultPanel
(
result
,
this
);
rpanel
=
new
ResultPanel
(
result
,
this
);
}
}
rpanel
.
setName
(
title
);
Tab
t1
=
ClassificationModel
.
createTab
(
title
,
new
ImageIcon
(
getClass
()
Tab
t1
=
ClassificationModel
.
createTab
(
title
,
new
ImageIcon
(
getClass
()
.
getResource
(
"/icons/actions/document-open-result.png"
)),
//$NON-NLS-1$
.
getResource
(
"/icons/actions/document-open-result.png"
)),
//$NON-NLS-1$
rpanel
,
true
);
rpanel
,
true
);
...
...
src/mustic/gui/DataSession.java
View file @
b4beb7d2
...
@@ -4,16 +4,25 @@ import java.awt.event.ActionEvent;
...
@@ -4,16 +4,25 @@ import java.awt.event.ActionEvent;
import
java.awt.event.ActionListener
;
import
java.awt.event.ActionListener
;
import
java.util.Vector
;
import
java.util.Vector
;
import
javax.swing.Icon
;
import
javax.swing.ImageIcon
;
import
javax.swing.ImageIcon
;
import
javax.swing.JButton
;
import
javax.swing.JButton
;
import
javax.swing.JComponent
;
import
javax.swing.JInternalFrame
;
import
javax.swing.JInternalFrame
;
import
javax.swing.JPanel
;
import
javax.swing.JPanel
;
import
javax.swing.border.EmptyBorder
;
import
javax.swing.border.EmptyBorder
;
import
jcl.data.Data
;
import
jcl.data.Data
;
import
mustic.gui.panels.BirdViewPanel
;
import
mustic.gui.panels.ImageResultPanel
;
import
mustic.gui.panels.ImageResultPanel
;
import
mustic.gui.panels.data.DataPanel
;
import
mustic.gui.panels.data.DataPanel
;
import
mustic.io.ImageData
;
import
mustic.io.ImageData
;
import
mustic.models.gui.ClassificationModel
;
import
net.infonode.tabbedpanel.TabDragEvent
;
import
net.infonode.tabbedpanel.TabEvent
;
import
net.infonode.tabbedpanel.TabListener
;
import
net.infonode.tabbedpanel.TabRemovedEvent
;
import
net.infonode.tabbedpanel.TabStateChangedEvent
;
import
net.infonode.tabbedpanel.TabbedPanel
;
import
net.infonode.tabbedpanel.TabbedPanel
;
import
net.infonode.tabbedpanel.titledtab.TitledTab
;
import
net.infonode.tabbedpanel.titledtab.TitledTab
;
...
@@ -29,24 +38,32 @@ public class DataSession {
...
@@ -29,24 +38,32 @@ public class DataSession {
* parametre permettant de savoir si l'image ouverte provient de la base de donnees
* parametre permettant de savoir si l'image ouverte provient de la base de donnees
* ?? repris d'ImageSession
* ?? repris d'ImageSession
*/
*/
public
JInternalFrame
associatedFrame
=
null
;
public
JInternalFrame
associatedFrame
=
null
;
/** the data attached to this session */
/** the data attached to this session */
private
Data
data
;
private
Data
data
=
null
;
/** Title of the session */
/** Title of the session */
private
String
mTitle
;
private
String
mTitle
;
/** Contains image, classifier, results */
/** Contains image, classifier, results */
protected
TabbedPanel
mWorskSpace
;
protected
TabbedPanel
mWorskSpace
=
new
TabbedPanel
()
;
/** all ImageResultPanels associated to this session */
/** all ImageResultPanels associated to this session */
private
Vector
<
ImageResultPanel
>
resultPanels
=
new
Vector
<
ImageResultPanel
>();
private
Vector
<
ImageResultPanel
>
resultPanels
=
new
Vector
<
ImageResultPanel
>();
private
DataPanel
dataPanel
;
/** panel that display the content of the data used and allow to modify it */
private
DataPanel
dataPanel
=
null
;
/** store the birdViewPanle currently used */
private
BirdViewPanel
currentBirdViewPanel
=
null
;
private
Vector
<
ClassificationModel
>
classifications
=
new
Vector
<
ClassificationModel
>();
/** save the number of clustering already done a the overall sessions */
/** save the number of clustering already done a the overall sessions */
public
static
int
nbClustering
=
1
;
public
static
int
nbClustering
=
1
;
/**
/**
...
@@ -60,17 +77,71 @@ public class DataSession {
...
@@ -60,17 +77,71 @@ public class DataSession {
this
.
dataPanel
=
new
DataPanel
(
data
);
this
.
dataPanel
=
new
DataPanel
(
data
);
this
.
mWorskSpace
=
dataPanel
.
tabbedPane
;
this
.
mWorskSpace
.
addTab
(
dataPanel
.
getDataTabPanel
());
this
.
mWorskSpace
.
addTabListener
(
new
TabListener
()
{
@Override
public
void
tabSelected
(
TabStateChangedEvent
arg0
)
{
if
(
arg0
.
getTab
()
instanceof
ClassificationTitledTab
)
{
// currentBirdViewPanel = ((ClassificationTitledTab) arg0.getTab())
}
}
@Override
public
void
tabRemoved
(
TabRemovedEvent
arg0
)
{
if
(
arg0
.
getTab
()
instanceof
ClassificationTitledTab
)
{
classifications
.
remove
(((
ClassificationTitledTab
)
arg0
.
getTab
())
.
getClassificationModel
());
}
}
@Override
public
void
tabMoved
(
TabEvent
arg0
)
{
}
@Override
public
void
tabHighlighted
(
TabStateChangedEvent
arg0
)
{
}
@Override
public
void
tabDropped
(
TabDragEvent
arg0
)
{
}
@Override
public
void
tabDragged
(
TabDragEvent
arg0
)
{
}
@Override
public
void
tabDragAborted
(
TabEvent
arg0
)
{
}
@Override
public
void
tabDeselected
(
TabStateChangedEvent
arg0
)
{
}
@Override
public
void
tabDehighlighted
(
TabStateChangedEvent
arg0
)
{
}
@Override
public
void
tabAdded
(
TabEvent
arg0
)
{
}
});
}
}
/**
/**
* Add a classifier for the data
* Add a classifier for the data
* @param classification
Image
* @param classification
Model
*/
*/
public
void
addClassifier
(
ClassificationImage
classificationImage
)
{
public
void
addClassifier
(
final
ClassificationModel
classificationModel
)
{
final
TitledTab
tab
=
new
TitledTab
(
Messages
.
getString
(
"ImageSession.7"
)
+
nbClustering
++,
//$NON-NLS-1$
null
,
classificationImage
.
tabbedPane
,
new
JPanel
());
classifications
.
add
(
classificationModel
);
final
TitledTab
tab
=
new
ClassificationTitledTab
(
Messages
.
getString
(
"ImageSession.7"
)
+
nbClustering
++,
//$NON-NLS-1$
null
,
classificationModel
.
tabbedPane
,
new
JPanel
(),
classificationModel
);
tab
.
setFocusableComponent
(
null
);
tab
.
setFocusableComponent
(
null
);
JButton
closeButton
=
new
JButton
(
new
ImageIcon
(
tab
.
getClass
().
getResource
(
"/icons/cluster-invisible.png"
)));
//$NON-NLS-1$
JButton
closeButton
=
new
JButton
(
new
ImageIcon
(
tab
.
getClass
().
getResource
(
"/icons/cluster-invisible.png"
)));
//$NON-NLS-1$
...
@@ -82,6 +153,7 @@ public class DataSession {
...
@@ -82,6 +153,7 @@ public class DataSession {
@Override
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
public
void
actionPerformed
(
ActionEvent
e
)
{
tab
.
getTabbedPanel
().
removeTab
(
tab
);
tab
.
getTabbedPanel
().
removeTab
(
tab
);
classifications
.
remove
(
classificationModel
);
}
}
});
});
tab
.
setHighlightedStateTitleComponent
(
closeButton
);
tab
.
setHighlightedStateTitleComponent
(
closeButton
);
...
@@ -170,6 +242,11 @@ public class DataSession {
...
@@ -170,6 +242,11 @@ public class DataSession {
return
this
.
mTitle
;
//$NON-NLS-1$
return
this
.
mTitle
;
//$NON-NLS-1$
}
}
/**
* Retrieve the list of ImageSession used to create the data
*
* @return the list of ImageSession
*/
public
Vector
<
ImageSession
>
getAssociatedImageSessions
()
{
public
Vector
<
ImageSession
>
getAssociatedImageSessions
()
{
if
(
data
instanceof
ImageData
)
{
if
(
data
instanceof
ImageData
)
{
if
(((
ImageData
)
data
).
getAssociatedImageSessions
()
!=
null
if
(((
ImageData
)
data
).
getAssociatedImageSessions
()
!=
null
...
@@ -180,4 +257,50 @@ public class DataSession {
...
@@ -180,4 +257,50 @@ public class DataSession {
return
null
;
return
null
;
}
}
/**
* The BirdViewPanel of the last classification selected
* @return the last BirdViewPanel
*/
public
BirdViewPanel
getCurrentBirdViewPanel
()
{
return
currentBirdViewPanel
;
}
/**
* The BirdViewPanel of the last classification selected
*
* @param panel
*/
public
void
setCurrentBirdViewPanel
(
BirdViewPanel
panel
)
{
this
.
currentBirdViewPanel
=
panel
;
}
public
Vector
<
ClassificationModel
>
getClassifications
()
{
return
classifications
;
}
/**
* Small class to allow a TitledTab to store a classification model
*
* @author Baptiste LAFABREGUE
*
*/
public
class
ClassificationTitledTab
extends
TitledTab
{
/** */
private
static
final
long
serialVersionUID
=
1L
;
private
ClassificationModel
model
=
null
;
public
ClassificationTitledTab
(
String
arg0
,
Icon
arg1
,
JComponent
arg2
,
JComponent
arg3
,
ClassificationModel
model
)
{
super
(
arg0
,
arg1
,
arg2
,
arg3
);
this
.
model
=
model
;
}
public
ClassificationModel
getClassificationModel
()
{
return
this
.
model
;
}
}
}
}
\ No newline at end of file
src/mustic/gui/MainFrame.java
View file @
b4beb7d2
...
@@ -128,7 +128,7 @@ public class MainFrame extends JFrame {
...
@@ -128,7 +128,7 @@ public class MainFrame extends JFrame {
private JPanel infosPanel;
private JPanel infosPanel;
/** boolean pour lier le birdview avec l'image active */
/** boolean pour lier le birdview avec l'image active */
private boolean linkToAllImages =
fals
e;
private boolean linkToAllImages =
tru
e;
/** the project root for datas */
/** the project root for datas */
private DefaultMutableTreeNode mDataProjectNode;
private DefaultMutableTreeNode mDataProjectNode;
...
@@ -702,23 +702,24 @@ public class MainFrame extends JFrame {
...
@@ -702,23 +702,24 @@ public class MainFrame extends JFrame {
CSVMenu.add(menuItemLoadCSVToData);
CSVMenu.add(menuItemLoadCSVToData);
JMenuItem customToDelete = new JMenuItem("custom"); //$NON-NLS-1$
//TODO to delete when no more used
customToDelete.addActionListener(new ActionListener() {
// JMenuItem customToDelete = new JMenuItem("custom"); //$NON-NLS-1$
@Override
// customToDelete.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// @Override
customClassify();
// public void actionPerformed(ActionEvent e) {
}
// customClassify();
});
// }
CSVMenu.add(customToDelete);
// });
// CSVMenu.add(customToDelete);
JMenuItem custom2ToDelete = new JMenuItem("extract custom"); //$NON-NLS-1$
//
custom2ToDelete.addActionListener(new ActionListener() {
// JMenuItem custom2ToDelete = new JMenuItem("extract custom"); //$NON-NLS-1$
@Override
// custom2ToDelete.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// @Override
extractcustomESV();
// public void actionPerformed(ActionEvent e) {
}
// extractcustomESV();
});
// }
CSVMenu.add(custom2ToDelete);
// });
// CSVMenu.add(custom2ToDelete);
// menuItemResultToCSV = new JMenuItem(Messages.getString("MainFrame.305")); //$NON-NLS-1$
// menuItemResultToCSV = new JMenuItem(Messages.getString("MainFrame.305")); //$NON-NLS-1$
// menuItemResultToCSV.addActionListener(new ActionListener() {
// menuItemResultToCSV.addActionListener(new ActionListener() {
...
@@ -840,21 +841,25 @@ public class MainFrame extends JFrame {
...
@@ -840,21 +841,25 @@ public class MainFrame extends JFrame {
menuView.add(menuContrast);
menuView.add(menuContrast);
menuConnect = new JMenu(Messages.getString("MainFrame.260")); //$NON-NLS-1$
menuConnect = new JMenu(Messages.getString("MainFrame.260")); //$NON-NLS-1$
menuConnectActiv = new JMenuItem(Messages.getString("MainFrame.261")); //$NON-NLS-1$
menuConnectActiv = new J
CheckBox
MenuItem(Messages.getString("MainFrame.261")); //$NON-NLS-1$
menuConnectActiv.addActionListener(new ActionListener() {
menuConnectActiv.addActionListener(new ActionListener() {
@Override
@Override
public void actionPerformed(ActionEvent e) {
public void actionPerformed(ActionEvent e) {
MainFrame.getInstance().setLierBirdView(true);
MainFrame.getInstance().setLierBirdView(false);
menuConnectActiv.setState(true);
menuConnectAll.setState(false);
}
}
});
});
menuConnect.add(menuConnectActiv);
menuConnect.add(menuConnectActiv);
ButtonGroup group = new ButtonGroup();
ButtonGroup group = new ButtonGroup();
menuConnectAll = new JMenuItem(Messages.getString("MainFrame.262")); //$NON-NLS-1$
menuConnectAll = new J
CheckBox
MenuItem(Messages.getString("MainFrame.262")); //$NON-NLS-1$
menuConnectAll.addActionListener(new ActionListener() {
menuConnectAll.addActionListener(new ActionListener() {
@Override
@Override
public void actionPerformed(ActionEvent e) {
public void actionPerformed(ActionEvent e) {
MainFrame.getInstance().setLierBirdView(false);
MainFrame.getInstance().setLierBirdView(true);
menuConnectActiv.setState(false);
menuConnectAll.setState(true);
}
}
});
});
group.add(menuConnectActiv);
group.add(menuConnectActiv);
...
@@ -1137,8 +1142,8 @@ public class MainFrame extends JFrame {
...
@@ -1137,8 +1142,8 @@ public class MainFrame extends JFrame {
private Boolean actionContratsP;
private Boolean actionContratsP;
private JMenuItem menuContrastM;
private JMenuItem menuContrastM;
private Boolean actionContrastM;
private Boolean actionContrastM;
private J
MenuItem
menuConnectActiv;
private J
CheckBoxMenuItem
menuConnectActiv;
private J
MenuItem
menuConnectAll;
private J
CheckBoxMenuItem
menuConnectAll;
private JMenuItem menuResetAll;
private JMenuItem menuResetAll;
private Boolean actionResetAll;
private Boolean actionResetAll;
private JMenuItem menuChooseRgb;
private JMenuItem menuChooseRgb;
...
@@ -1316,8 +1321,10 @@ public class MainFrame extends JFrame {
...
@@ -1316,8 +1321,10 @@ public class MainFrame extends JFrame {
menuBrightM.setEnabled(this.actionBrightM);
menuBrightM.setEnabled(this.actionBrightM);
menuContrastP.setEnabled(this.actionContratsP);
menuContrastP.setEnabled(this.actionContratsP);
menuContrastM.setEnabled(this.actionContrastM);
menuContrastM.setEnabled(this.actionContrastM);
menuConnectActiv.setEnabled(!this.isLinkToAllBirdView());
menuConnectActiv.setEnabled(this.isLinkToAllBirdView());
menuConnectAll.setEnabled(this.isLinkToAllBirdView());
menuConnectAll.setEnabled(!this.isLinkToAllBirdView());
menuConnectActiv.setState(!this.isLinkToAllBirdView());
menuConnectAll.setState(this.isLinkToAllBirdView());
menuResetAll.setEnabled(this.actionResetAll);
menuResetAll.setEnabled(this.actionResetAll);
menuChooseRgb.setEnabled(this.actionChooseRgb);
menuChooseRgb.setEnabled(this.actionChooseRgb);
menuRefresh.setEnabled(this.actionRefresh);
menuRefresh.setEnabled(this.actionRefresh);
...
@@ -1612,14 +1619,11 @@ public class MainFrame extends JFrame {
...
@@ -1612,14 +1619,11 @@ public class MainFrame extends JFrame {
this.desktop.addDataFrame(dataSession);
this.desktop.addDataFrame(dataSession);
else
else
this.desktop.setSelectedFrame(dataSession.associatedFrame);
this.desktop.setSelectedFrame(dataSession.associatedFrame);
// this.birdPanel.add(dataSession.getBirdViewPanel());
if(dataSession.getCurrentBirdViewPanel() != null) {
this.birdPanel.add(dataSession.getCurrentBirdViewPanel());
}
}
}
if (aSession != null) {
// fill the west panel with right information if a session is open
this.infosPanel.add(aSession.getInfoPanel());
this.birdPanel.add(aSession.getBirdPanel());
}
// =============== Creation of the Desktop ================
// =============== Creation of the Desktop ================
JPanel panel_desktop = new JPanel(new BorderLayout());
JPanel panel_desktop = new JPanel(new BorderLayout());
...
@@ -2093,6 +2097,9 @@ public class MainFrame extends JFrame {
...
@@ -2093,6 +2097,9 @@ public class MainFrame extends JFrame {
refreshButton.addActionListener(new ActionListener() {
refreshButton.addActionListener(new ActionListener() {
@Override
@Override
public void actionPerformed(ActionEvent e) {
public void actionPerformed(ActionEvent e) {
if (currentImageSession != null) {
currentImageSession.getImagePanel().resetAll();
}
MainFrame.this.repaint();
MainFrame.this.repaint();
}
}
});
});
...
@@ -3712,10 +3719,6 @@ public class MainFrame extends JFrame {
...
@@ -3712,10 +3719,6 @@ public class MainFrame extends JFrame {
public void setLaunchOrthoRect(boolean launchOrthoRect) {
public void setLaunchOrthoRect(boolean launchOrthoRect) {
this.launchOrthoRect = launchOrthoRect;
this.launchOrthoRect = launchOrthoRect;
}
}
private void exportData() {
}
private void customClassify() {
private void customClassify() {
HybridClassification classification = new HybridClassification();
HybridClassification classification = new HybridClassification();
...
@@ -3796,7 +3799,7 @@ public class MainFrame extends JFrame {
...
@@ -3796,7 +3799,7 @@ public class MainFrame extends JFrame {
//// >>>> REPLACE PARAM
//// >>>> REPLACE PARAM
Thread t = null;
Thread t = null;
ClassificationImage classificationImage = new ClassificationImage(
dataTest
,
ClassificationImage classificationImage = new ClassificationImage(
testSession
,
Messages.getString("ClassifierPanel.73") + DataSession.nbClustering, //$NON-NLS-1$
Messages.getString("ClassifierPanel.73") + DataSession.nbClustering, //$NON-NLS-1$
true);
true);
...
...
src/mustic/gui/dialog/CropDialog.java
View file @
b4beb7d2
...
@@ -6,6 +6,7 @@ import java.awt.geom.AffineTransform;
...
@@ -6,6 +6,7 @@ import java.awt.geom.AffineTransform;
import
java.awt.image.AffineTransformOp
;
import
java.awt.image.AffineTransformOp
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.swing.*
;
import
javax.swing.*
;
...
@@ -79,35 +80,11 @@ public class CropDialog extends JInternalFrame {
...
@@ -79,35 +80,11 @@ public class CropDialog extends JInternalFrame {
}
}
@Override
protected
Picture
load
(
double
zoomfactor
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
protected
Picture
load
(
double
zoomfactor
,
int
band
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
@Override
public
double
[][][]
load
(
int
x
,
int
y
,
int
w
,
int
h
)
{
public
double
[][][]
load
(
int
x
,
int
y
,
int
w
,
int
h
)
{
return
data
;
return
data
;
}
}
@Override
protected
Picture
load
(
int
x
,
int
y
,
int
w
,
int
h
,
int
dest_w
,
int
dest_h
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
double
[][][]
loadData
(
int
x
,
int
y
,
int
w
,
int
h
,
int
stepx
,
int
stepy
)
{
// TODO Auto-generated method stub
return
null
;
}
}
}
static
private
final
int
ACT_MOVE
=
1
;
static
private
final
int
ACT_MOVE
=
1
;
...
@@ -614,7 +591,7 @@ public class CropDialog extends JInternalFrame {
...
@@ -614,7 +591,7 @@ public class CropDialog extends JInternalFrame {
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{}
}
}
public
void
save_actionPerformed
()
{
public
void
save_actionPerformed
()
{
JFileChooser
fileChooser
=
new
JFileChooser
();
JFileChooser
fileChooser
=
new
JFileChooser
();
String
path
=
CropDialog
.
this
.
session
.
getRawImage
().
getPath
();
String
path
=
CropDialog
.
this
.
session
.
getRawImage
().
getPath
();
path
=
path
.
substring
(
0
,
path
.
length
()
-
4
)
+
Messages
.
getString
(
"CropDialog.30"
);
//$NON-NLS-1$
path
=
path
.
substring
(
0
,
path
.
length
()
-
4
)
+
Messages
.
getString
(
"CropDialog.30"
);
//$NON-NLS-1$
...
@@ -756,8 +733,7 @@ public class CropDialog extends JInternalFrame {
...
@@ -756,8 +733,7 @@ public class CropDialog extends JInternalFrame {
MainFrame
.
getInstance
().
openSession
(
new
File
(
path
));
MainFrame
.
getInstance
().
openSession
(
new
File
(
path
));
}
}
}
}
else
{
else
{
File
f
=
new
File
(
path
+
".bsq"
);
//$NON-NLS-1$
File
f
=
new
File
(
path
+
".bsq"
);
//$NON-NLS-1$
if
(
f
.
exists
())
{
if
(
f
.
exists
())
{
int
rep
=
JOptionPane
.
showConfirmDialog
(
this
,
Messages
.
getString
(
"CropDialog.65"
)
+
Messages
.
getString
(
"CropDialog.66"
),
//$NON-NLS-1$ //$NON-NLS-2$
int
rep
=
JOptionPane
.
showConfirmDialog
(
this
,
Messages
.
getString
(
"CropDialog.65"
)
+
Messages
.
getString
(
"CropDialog.66"
),
//$NON-NLS-1$ //$NON-NLS-2$
...
...
src/mustic/gui/panels/BirdViewPanel.java
View file @
b4beb7d2
...
@@ -10,17 +10,20 @@ import java.awt.event.MouseEvent;
...
@@ -10,17 +10,20 @@ import java.awt.event.MouseEvent;
import
java.awt.event.MouseListener
;
import
java.awt.event.MouseListener
;
import
java.awt.event.MouseMotionListener
;
import
java.awt.event.MouseMotionListener
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.util.Observable
;
import
java.util.Observer
;
import
java.util.Vector
;
import
java.util.Vector
;
import
javax.swing.JPanel
;
import
javax.swing.JPanel
;
import
mustic.gui.ImageDesktopFrame
;
import
mustic.gui.ImageDesktopFrame
;
import
mustic.gui.ImageManager
;
import
mustic.gui.ImageManager
;
import
mustic.gui.ImageSession
;
import
mustic.gui.MainFrame
;
import
mustic.gui.MainFrame
;
import
mustic.io.PiLLiTools
;
import
mustic.io.PiLLiTools
;
public
class
BirdViewPanel
extends
JPanel
implements
MouseListener
,
public
class
BirdViewPanel
extends
JPanel
implements
MouseListener
,
MouseMotionListener
{
MouseMotionListener
,
Observer
{
/** Represents the moving action. */
/** Represents the moving action. */
static
private
final
int
ACT_MOVE
=
1
;
static
private
final
int
ACT_MOVE
=
1
;
...
@@ -594,34 +597,23 @@ public class BirdViewPanel extends JPanel implements MouseListener,
...
@@ -594,34 +597,23 @@ public class BirdViewPanel extends JPanel implements MouseListener,
this
.
repaint
();
this
.
repaint
();
this
.
action
=
BirdViewPanel
.
ACT_NONE
;
this
.
action
=
BirdViewPanel
.
ACT_NONE
;