Commit 4242aa62 authored by lafabregue's avatar lafabregue

switched from Constraints window to ImageAddon

parent 7e1071e6
......@@ -19,6 +19,7 @@ import mustic.gui.panels.data.DataPanel;
import mustic.io.ImageData;
import mustic.models.gui.ClassificationModel;
import mustic.models.gui.panels.ResultPanel;
import mustic.utils.image.ImageDisplayer;
import net.infonode.tabbedpanel.TabDragEvent;
import net.infonode.tabbedpanel.TabEvent;
import net.infonode.tabbedpanel.TabListener;
......
......@@ -15,6 +15,7 @@ import mustic.gui.panels.ImageInformationPanel;
import mustic.gui.panels.ImagePanel;
import mustic.gui.segmentation.SegmentationPanel;
import mustic.io.RawImage;
import mustic.utils.image.ImageManager;
import net.infonode.tabbedpanel.TabFactory;
import net.infonode.tabbedpanel.TabbedPanel;
import net.infonode.tabbedpanel.titledtab.TitledTab;
......@@ -245,7 +246,7 @@ public class ImageSession extends ImageManager {
if (displayEnable) {
((ImagePanel) this.displayer).applyMask(this.rawImage.getMask());
((ImagePanel) this.displayer).refresh();
((ImagePanel) this.displayer).refresh(true);
}
}
......
This diff is collapsed.
......@@ -50,8 +50,8 @@ public class RgbBandChooserInternalFrame extends JInternalFrame {
public RgbBandChooserInternalFrame(final RawImage rawImage) {
super();
this.scaledMax = rawImage.getScaledMaxValues();
this.scaledMin = rawImage.getScaledMinValues();
this.scaledMax = rawImage.getScaledMaxValues().clone();
this.scaledMin = rawImage.getScaledMinValues().clone();
this.redComboBox = new JComboBox<String>();
this.redMin = new JTextArea();
this.redMax = new JTextArea();
......
......@@ -301,10 +301,10 @@ public class SequenceDialog extends JDialog {
* @throws FormatException
* if the images don't have the same dimensions
*/
public Vector<String> getSequenceData() throws FormatException {
public Vector<RawImage> getSequenceData() throws FormatException {
int nb = this.dlmSeq.getSize();
Donnee donnee;
Vector<String> paths = new Vector<String>();
Vector<RawImage> paths = new Vector<RawImage>();
if (nb > 0) {
ImageDesktopFrame[] desktopFrames = MainFrame.getInstance().getDesktop()
......@@ -314,7 +314,7 @@ public class SequenceDialog extends JDialog {
for (int i = 0; i < nb; i++) {
donnee = (Donnee) this.dlmSeq.getElementAt(i);
paths.add(desktopFrames[donnee.index].getImageSession()
.getRawImage().getPath());
.getRawImage());
}
}
......
......@@ -26,19 +26,19 @@ public class ConstraintsColor extends JDialog {
private static final long serialVersionUID = 1L;
/** constraints colors */
private Color mustLinkColor = new Color(124, 252, 0);
private Color cannotLinkColor = new Color(255, 0, 255);
private Vector<Color> labelConstraintColor = new Vector<Color>();
private Color mustLinkColor = new Color(124, 252, 0);
private Color cannotLinkColor = new Color(255, 0, 255);
private Vector<Color> labelConstraintColor = new Vector<Color>();
/** constraints buttons */
private JButton jb_mustLinkChooseColor = new JButton();
private JButton jb_cannotLinkChooseColor = new JButton();
private Vector<JButton> jb_labelConstraintClassChooseColor = new Vector<JButton>();
private JButton jb_mustLinkChooseColor = new JButton();
private JButton jb_cannotLinkChooseColor = new JButton();
private Vector<JButton> jb_labelConstraintClassChooseColor = new Vector<JButton>();
/** dynamic JPanel Colors of Label Constraints Classes*/
JPanel labelColorConstraintPanel = new JPanel(new GridLayout(0,1));
private JPanel labelColorConstraintPanel = new JPanel(new GridLayout(0,1));
private ConstraintsSelectionDialog dialog = null;
private ConstraintsSelectionFrame dialog = null;
/**
* @brief Constructor dialog window that allows the user to change the color of the constraints
......@@ -47,7 +47,7 @@ public class ConstraintsColor extends JDialog {
* @param colorCL
* @param colorVectorLabel
*/
public ConstraintsColor(ConstraintsSelectionDialog d, Color colorML, Color colorCL, Vector<Color> colorVectorLabel) {
public ConstraintsColor(ConstraintsSelectionFrame d, Color colorML, Color colorCL, Vector<Color> colorVectorLabel) {
this.dialog = d;
this.mustLinkColor = colorML;
this.cannotLinkColor = colorCL;
......
......@@ -24,12 +24,12 @@ import mustic.utils.filters.CSVFileFilter;
*/
public class ExportConstraintsTask extends SwingWorker<Void, Void>
{
ConstraintsSelectionDialog dialog = null;
ConstraintsSelectionFrame dialog = null;
static final private int incrementation = 10;
static int progress = 0;
static int jalon = incrementation; // avoid too many progress update
public ExportConstraintsTask (ConstraintsSelectionDialog dialog)
public ExportConstraintsTask (ConstraintsSelectionFrame dialog)
{
this.dialog = dialog;
}
......
......@@ -21,12 +21,12 @@ import mustic.utils.io.CSVUtils;
*/
public class ImportConstraintsTask extends SwingWorker<Void, Void>
{
ConstraintsSelectionDialog dialog = null;
ConstraintsSelectionFrame dialog = null;
static final private int incrementation = 10;
static int progress = 0;
static int jalon = incrementation; // avoid too many progress update
public ImportConstraintsTask (ConstraintsSelectionDialog dialog)
public ImportConstraintsTask (ConstraintsSelectionFrame dialog)
{
this.dialog = dialog;
}
......@@ -108,8 +108,7 @@ public class ImportConstraintsTask extends SwingWorker<Void, Void>
}
dialog.enableAllComponents();
dialog.displayPixels();
dialog.updateUI();
dialog.refresh();
imageOuvre = true;
}
......
......@@ -17,10 +17,10 @@ import java.util.Vector;
import javax.swing.JPanel;
import mustic.gui.ImageDesktopFrame;
import mustic.gui.ImageManager;
import mustic.gui.ImageSession;
import mustic.gui.MainFrame;
import mustic.io.PiLLiTools;
import mustic.utils.image.ImageManager;
public class BirdViewPanel extends JPanel implements MouseListener,
MouseMotionListener, Observer {
......@@ -593,6 +593,16 @@ public class BirdViewPanel extends JPanel implements MouseListener,
if(!session.isDisplayEnable())
return;
this.setCursor(Cursor.getDefaultCursor());
if (this.selArea.x < 0) {
selArea.width = selArea.width + selArea.x;
selArea.x = 0;
}
if (this.selArea.y < 0) {
selArea.height = selArea.height + selArea.y;
selArea.y = 0;
}
this.repaint();
this.action = BirdViewPanel.ACT_NONE;
......@@ -687,7 +697,7 @@ public class BirdViewPanel extends JPanel implements MouseListener,
* @param height
* height in the original image
*/
public void updateSelectedArea(int x, int y, int width, int height) {
public void updateSelectedArea(int x, int y, double width, double height) {
double xfact = (double) this.session.getRawImage().getWidth()
/ (double) mBirdImage.getWidth();
double yfact = (double) this.session.getRawImage().getHeight()
......@@ -741,8 +751,8 @@ public class BirdViewPanel extends JPanel implements MouseListener,
int rx = (int) (this.selArea.x * xfact);
int ry = (int) (this.selArea.y * yfact);
int width = (int) Math.ceil(this.selArea.width * xfact);
int height = (int) Math.ceil(this.selArea.height * yfact);
double width = this.selArea.width * xfact;
double height = this.selArea.height * yfact;
this.session.getImageDisplayer().updateImageViewTo(rx, ry, width, height);
......@@ -770,46 +780,53 @@ public class BirdViewPanel extends JPanel implements MouseListener,
double xgeo;
double ygeo;
if (this.session.getRawImage().getInitPosGeo() != null) {
int rx;
int ry;
double width;
double height;
if (this.session.getRawImage().getInitPosGeo() != null &&
session.getRawImage().getInitPosGeo() != null) {
xgeo = this.session.getRawImage().getInitPosGeoX() + this.selArea.x * xfact
* this.session.getRawImage().getResolution()[0];
ygeo = this.session.getRawImage().getInitPosGeoY() - this.selArea.y * yfact
* this.session.getRawImage().getResolution()[1];
} else {
xgeo = this.selArea.x * xfact;
ygeo = this.selArea.y * yfact;
}
int rx;
int ry;
if (session.getRawImage().getInitPosGeo() != null) {
rx = (int) ((xgeo - session.getRawImage().getInitPosGeoX()) / session
.getRawImage().getResolution()[0]);
ry = (int) ((session.getRawImage().getInitPosGeoY() - ygeo) / session
.getRawImage().getResolution()[1]);
} else {
width = this.selArea.width * xfact * this.session.getRawImage().getResolution()[0]
/ session.getRawImage().getResolution()[0];
height = this.selArea.height * yfact * this.session.getRawImage().getResolution()[1]
/ session.getRawImage().getResolution()[1];
} else {
rx = (int) (this.selArea.x * xfact);
ry = (int) (this.selArea.y * yfact);
width = this.selArea.width * xfact;
height = this.selArea.height * yfact;
}
xfact = (double) session.getRawImage().getWidth()
/ (double) session.getBirdViewPanel().getImage().getWidth();
yfact = (double) session.getRawImage().getHeight()
/ (double) session.getBirdViewPanel().getImage().getHeight();
int width = (int) Math.ceil(this.selArea.width * xfact);
int height = (int) Math.ceil(this.selArea.height * yfact);
if (width > session.getRawImage().getWidth())
width = session.getRawImage().getWidth();
if (height > session.getRawImage().getHeight())
height = session.getRawImage().getHeight();
if (rx + width >= session.getRawImage().getWidth())
rx = session.getRawImage().getWidth() - width - 1;
rx = session.getRawImage().getWidth() - (int) Math.ceil(width) - 1;
if (rx < 0)
rx = 0;
if (ry + height >= session.getRawImage().getHeight())
ry = session.getRawImage().getHeight() - height - 1;
ry = session.getRawImage().getHeight() - (int) Math.ceil(height) - 1;
if (ry < 0)
ry = 0;
......@@ -818,36 +835,36 @@ public class BirdViewPanel extends JPanel implements MouseListener,
}
public void update() {
double x_zoomFactor = 1;
double y_zoomFactor = 1;
double dest_w = 180;
double dest_h = 200;
// we considerate only the smallest zoom factor
if (this.session.getRawImage().getWidth() > 0)
x_zoomFactor = (double) dest_w / (double) this.session.getRawImage().getWidth();
if (this.session.getRawImage().getHeight() > 0)
y_zoomFactor = (double) dest_h / (double) this.session.getRawImage().getHeight();
if (MainFrame.DEBUG_MODE)
System.out.println("public void createBirdview(int dest_w, int dest_h)" + dest_w + " " + dest_h + " "
+ x_zoomFactor + " " + y_zoomFactor);
if (x_zoomFactor < y_zoomFactor)
{
this.mBirdImage = this.session.getImageDisplayer().getBirdViewImage(x_zoomFactor);
}
else
{
this.mBirdImage = this.session.getImageDisplayer().getBirdViewImage(y_zoomFactor);
}
}
@Override
public void update(Observable o, Object arg) {
// try {
// Thread.sleep(1000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// double x_zoomFactor = 1;
// double y_zoomFactor = 1;
// double dest_w = 180;
// double dest_h = 200;
//
// // we considerate only the smallest zoom factor
// if (this.session.getRawImage().getWidth() > 0)
// x_zoomFactor = (double) dest_w / (double) this.session.getRawImage().getWidth();
// if (this.session.getRawImage().getHeight() > 0)
// y_zoomFactor = (double) dest_h / (double) this.session.getRawImage().getHeight();
//
// if (MainFrame.DEBUG_MODE)
// System.out.println("public void createBirdview(int dest_w, int dest_h)" + dest_w + " " + dest_h + " "
// + x_zoomFactor + " " + y_zoomFactor);
//
// if (x_zoomFactor < y_zoomFactor)
// {
// this.mBirdImage = this.session.getImageDisplayer().getBirdViewImage(x_zoomFactor);
// }
// else
// {
// this.mBirdImage = this.session.getImageDisplayer().getBirdViewImage(y_zoomFactor);
// }
//update();
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -25,6 +25,7 @@ import mustic.gui.dialog.SequenceDialog;
import mustic.gui.panels.data.components.SamplingSelectionPanel;
import mustic.gui.panels.data.components.SourceSelectionPanel;
import mustic.io.ImageData;
import mustic.io.RawImage;
import mustic.utils.documentFilter.ToUpdateObject;
/**
......@@ -42,7 +43,7 @@ public class DataConstructPanel extends JPanel implements ToUpdateObject {
public static int IMAGE_SOURCE_TYPE = 0;
public static int SEGMENTATION_SOURCE_TYPE = 1;
private Vector<String> filesPaths = null;
private Vector<RawImage> filesPaths = null;
private Vector<ImageSession> imageSessions = null;
......@@ -161,7 +162,7 @@ public class DataConstructPanel extends JPanel implements ToUpdateObject {
* @param filesPaths
* the list of image's file paths
*/
public void setFileSources(Vector<String> filesPaths) {
public void setFileSources(Vector<RawImage> filesPaths) {
this.filesPaths = filesPaths;
}
......@@ -170,7 +171,7 @@ public class DataConstructPanel extends JPanel implements ToUpdateObject {
*
* @return the list of image's file paths
*/
public Vector<String> getFilesSources() {
public Vector<RawImage> getFilesSources() {
return filesPaths;
}
......
......@@ -137,7 +137,8 @@ public class DataPanel extends JPanel implements ChangeListener {
JPanel container = buildBody();
JScrollPane sp = new JScrollPane(container);
JPanel dataPane = new JPanel(new BorderLayout());
dataPane.setSize(700, 500);
// dataPane.setSize(700, 500);
dataPane.setPreferredSize(new Dimension(700,500));
dataPane.add(sp, BorderLayout.CENTER);
/* Panel des donnees */
tabPanel = TabFactory.createTitledTab(
......@@ -348,7 +349,8 @@ public class DataPanel extends JPanel implements ChangeListener {
new DataViewPanel(DataPanel.this.data,
DataPanel.this.nbobjLabel),
ClarffxDialog.CLOSE_BUTTONS);
viewDataDialog.setSize(700, 500);
// viewDataDialog.setSize(700, 500);
viewDataDialog.setPreferredSize(new Dimension(700,500));
RefineryUtilities.centerFrameOnScreen(viewDataDialog);
/** @todo */
viewDataDialog.setTitle("Data View");
......@@ -366,7 +368,8 @@ public class DataPanel extends JPanel implements ChangeListener {
ClarffxDialog viewDataDialog = new ClarffxDialog(
new ScatterPlotPanel(DataPanel.this.data, null),
ClarffxDialog.CLOSE_BUTTONS);
viewDataDialog.setSize(600, 450);
// viewDataDialog.setSize(600, 450);
viewDataDialog.setPreferredSize(new Dimension(600,450));
RefineryUtilities.centerFrameOnScreen(viewDataDialog);
viewDataDialog.setTitle("Data View");
viewDataDialog.setVisible(true);
......@@ -396,7 +399,8 @@ public class DataPanel extends JPanel implements ChangeListener {
ClarffxDialog viewCommentsDialog = new ClarffxDialog(
commentsPanel, ClarffxDialog.CLOSE_BUTTONS);
viewCommentsDialog.setSize(700, 500);
// viewCommentsDialog.setSize(700, 500);
viewCommentsDialog.setPreferredSize(new Dimension(700,500));
RefineryUtilities.centerFrameOnScreen(viewCommentsDialog);
viewCommentsDialog.setTitle("Comments");
viewCommentsDialog.setVisible(true);
......
......@@ -300,12 +300,16 @@ public class SourceSelectionPanel extends JPanel {
try {
boolean allGeoReferenced = true;
Vector<double[]> geoTranslateVectors = new Vector<double[]>();
RawImage[] rawImages = new RawImage[fatherContainer
.getSequenceDialog().getSequenceData().size()];
Vector<RawImage> sequenceData = fatherContainer.getSequenceDialog().getSequenceData();
fatherContainer.setFileSources(sequenceData);
fatherContainer.setImageSessions(fatherContainer
.getSequenceDialog().getSequenceSessions());
RawImage[] rawImages = new RawImage[sequenceData.size()];
Vector<String> filesPaths = new Vector<String>();
// we test if all images are geoReferenced
for(int i = 0 ; i < rawImages.length ; i++) {
rawImages[i] = new RawImage(fatherContainer.getSequenceDialog()
.getSequenceData().get(i));
filesPaths.add(sequenceData.get(i).getFilename());
rawImages[i] = sequenceData.get(i);
if (rawImages[i].getInfoImage().isGeoReferenced()) {
double[] imageVector = new double[4];
imageVector[0] = rawImages[i].getInitPosGeoX();
......@@ -321,20 +325,14 @@ public class SourceSelectionPanel extends JPanel {
if (allGeoReferenced) {
int[] boundaries = RawImage.getGeoOverlappingPixelBoundaries(rawImages);
if (boundaries != null) {
fatherContainer.setSample(new ImageSampler(fatherContainer.getSequenceDialog()
.getSequenceData(), geoTranslateVectors, boundaries[0], boundaries[1], boundaries[2], boundaries[3]));
fatherContainer.setSample(new ImageSampler(filesPaths, geoTranslateVectors,
boundaries[0], boundaries[1], boundaries[2], boundaries[3]));
} else {
fatherContainer.setSample(new ImageSampler(fatherContainer
.getSequenceDialog().getSequenceData()));
fatherContainer.setSample(new ImageSampler(filesPaths));
}
} else {
fatherContainer.setSample(new ImageSampler(fatherContainer
.getSequenceDialog().getSequenceData()));
fatherContainer.setSample(new ImageSampler(filesPaths));
}
fatherContainer.setFileSources(fatherContainer
.getSequenceDialog().getSequenceData());
fatherContainer.setImageSessions(fatherContainer
.getSequenceDialog().getSequenceSessions());
} catch (FormatException e) {
e.printStackTrace();
}
......@@ -349,9 +347,9 @@ public class SourceSelectionPanel extends JPanel {
if (index < desktopFrames.length && index != -1) {
fatherContainer.setSample(new ImageSampler(allImageDesktopFrames[index]
.getImageSession().getImageFilePath()));
Vector<String> filesPath = new Vector<String>();
Vector<RawImage> filesPath = new Vector<RawImage>();
filesPath.add(allImageDesktopFrames[index]
.getImageSession().getImageFilePath());
.getImageSession().getRawImage());
fatherContainer.setFileSources(filesPath);
Vector<ImageSession> imageSessions = new Vector<ImageSession>();
imageSessions.add(allImageDesktopFrames[index].getImageSession());
......
......@@ -237,14 +237,14 @@ public class ImageData extends SimpleData implements Serializable {
* @param mask
* a mask to apply to the sampler
*/
public ImageData(Sampler sampler, String path, Mask mask) {
public ImageData(Sampler sampler, RawImage path, Mask mask) {
if (MainFrame.DEBUG_MODE) {
System.out.println(">> ImageData(Sampler,String) <<");
}
MainFrame.getProgressStatus().setMessage("loading sampler...");
this.rawImages.add(new RawImage(path));
this.rawImages.add(path);
long startTime = System.currentTimeMillis();
......@@ -255,9 +255,9 @@ public class ImageData extends SimpleData implements Serializable {
names[i] = "Band " + (i + 1);
}
setDataName(getFileNameFromPath(path));
setDataName(getFileNameFromPath(path.getFilename()));
Vector<String> filesName = new Vector<String>();
filesName.add(path);
filesName.add(path.getFilename());
setDataFilesName(filesName);
//this.setDataFileName(image.getPath());
setAttributesNames(names);
......@@ -304,7 +304,7 @@ public class ImageData extends SimpleData implements Serializable {
* @param path
* the path of the image
*/
public ImageData(Sampler sampler, String path) {
public ImageData(Sampler sampler, RawImage path) {
this(sampler, path, null);
}
......@@ -322,9 +322,9 @@ public class ImageData extends SimpleData implements Serializable {
* @param mask
* a mask to apply to the sampler
*/
public ImageData(Sampler sampler, Vector<String> images, Mask mask) {
for(String s : images) {
this.rawImages.add(new RawImage(s));
public ImageData(Sampler sampler, Vector<RawImage> images, Mask mask) {
for(RawImage s : images) {
this.rawImages.add(s);
}
if (MainFrame.DEBUG_MODE) {
......@@ -342,10 +342,11 @@ public class ImageData extends SimpleData implements Serializable {
names[i] = "Band " + (i + 1);
}
setDataName("Sequence "+getFileNameFromPath(images.get(0))+"-"+getFileNameFromPath(images.get(images.size()-1)));
setDataName("Sequence "+getFileNameFromPath(images.get(0).getFilename())
+ "-" + getFileNameFromPath(images.get(images.size()-1).getFilename()));
Vector<String> filesName = new Vector<String>();
for(String s : images) {
filesName.add(s);
for(RawImage s : images) {
filesName.add(s.getFilename());
}
setDataFilesName(filesName);
setAttributesNames(names);
......@@ -396,7 +397,7 @@ public class ImageData extends SimpleData implements Serializable {
* @param mask
* a mask to apply to the sampler
*/
public ImageData(Sampler sampler, Vector<String> images) {
public ImageData(Sampler sampler, Vector<RawImage> images) {
this(sampler, images, null);
}
......
......@@ -2232,7 +2232,7 @@ public class RawImage extends Observable implements Serializable, MemoryFlush
if(scaledMaxValues == null) {
computeMinMax();
}
return maxValues;
return scaledMaxValues;
}
/**
......
package mustic.utils.image;
import java.awt.Point;
import java.awt.image.BufferedImage;
public interface ImageAddOn {
/**
* Request the add-on to reload a BufferedImage with elements from this add-on
*
* @param view
* the BufferedImage to update
* @param rx
* the x coordinate of the top left corner of the BufferedImage
* in the original image
* @param ry
* the y coordinate of the top left corner of the BufferedImage
* in the original image
* @param rw
* the width of the BufferedImage in the original image
* @param rh
* the height of the BufferedImage in the original image
*/
void reloadElements(BufferedImage view, int x, int y, int w, int h);
/**
* Notify the add-on that a point was clicked
*
* @param p the clicked point
*/
void pointClicked(Point p);
}
package mustic.gui;
package mustic.utils.image;
import java.awt.Point;
import java.awt.image.BufferedImage;
public interface ImageDisplayer {
public interface ImageDisplayer extends Zoomable {
/**
......@@ -36,7 +37,35 @@ public interface ImageDisplayer {
*/
void reloadPoint(int xxsave, int yysave, int rxsave, int rysave);
/**
* Refresh the displayed image and
*
* @param force
* true if we also reload all the displayed elements in it, false otherwise
*/
void refresh(boolean force);
/**
* Convert a pixel reference from image coordinates to screen coordinates
* @param x
* x coordinate of the pixel in the image
* @param y
* x coordinate of the pixel in the image
* @return coordinate in the screen
*/
public Point converteCoordinatesToScreen(int x, int y);
/**
* Convert a pixel reference from screen coordinates to image coordinates
* @param x
* x coordinate of the pixel in the screen
* @param y
* x coordinate of the pixel in the screen
* @return coordinate in the image
*/
public Point converteCoordinatesToImage(int x, int y);
/**
* Update the screen image to contains an area from the source image
* It always takes the higher zoom rate, between width and height
......@@ -50,6 +79,24 @@ public interface ImageDisplayer {
* @param rheight
* the height of the selection
*/
void updateImageViewTo(int rx, int ry, int rwidth, int rheight);
void updateImageViewTo(int rx, int ry, double rwidth, double rheight);
/**
* Subscribe to an add-on, this add-on will be called when the Displayer
* is refresh
*
* @param addOn
* the add-on to subscribe to
*/
void subscribeTo(ImageAddOn addOn);
/**
* Unsubscribe to an add-on, this add-on will be called when the Displayer
* is refresh
*
* @param addOn
* the add-on to unsubscribe to
*/
void unsubscribeTo(ImageAddOn addOn);
}
package mustic.gui;
package mustic.utils.image;
import mustic.gui.panels.BirdViewPanel;
......
......@@ -20,6 +20,13 @@ public interface Zoomable {
*/
public BufferedImage getDisplayedImage();
/**
* Return the ZoomBoxPanel contained the Zoomable object
*
* @return the ZoomBoxPanel
*/
public ZoomBoxPanel getDisplayPanel();
/**
* Return the corresponding area from the source image from
* displayed image relative coordinates
......
package mustic.utils.image;
package mustic.utils.image.viewer;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
......@@ -10,6 +10,7 @@ import jcl.data.mask.Mask;
import jcl.utils.Images.StreamedImageReaderWrapper;
import loci.formats.FormatException;
import mustic.io.RawImage;
import mustic.utils.image.BufferedImageHelper;
/**
* Implementation that store the whole image in memory.
......
package mustic.utils.image;
package mustic.utils.image.viewer;
import java.awt.Color;
import java.awt.image.BufferedImage;
......@@ -88,5 +88,79 @@ public class ClusteringImageViewer extends ImageViewer {
protected void updateImageConstruction() {
sourceViewer.updateImageConstruction();
}
// Override of all other methods to transfer the instruction to the sourceViewer
public void decreaseBrightness() {
sourceViewer.decreaseBrightness();
}