Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcross committed Oct 29, 2024
2 parents 063678d + c1c9589 commit 905fcac
Show file tree
Hide file tree
Showing 15 changed files with 66 additions and 80 deletions.
4 changes: 2 additions & 2 deletions mia-algorithms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-algorithms</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-algorithms</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-bonej/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-bonej</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-bonej</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-coordinates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-coordinates</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-coordinates</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-core</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-core</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-deepimagej/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-deepimagej</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-deepimagej</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
8 changes: 4 additions & 4 deletions mia-macros/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-macros</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-macros</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down Expand Up @@ -127,13 +127,13 @@
<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-core</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</dependency>

<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-modules</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions mia-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-modules</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-modules</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down Expand Up @@ -127,7 +127,7 @@
<dependency>
<groupId>io.github.mianalysis</groupId>
<artifactId>mia-core</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions mia-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-plugin</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-plugin</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import java.awt.event.KeyListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Set;
import java.util.TreeSet;
Expand Down Expand Up @@ -50,12 +48,13 @@ public class ClassSelector implements ActionListener, KeyListener {
private SortedListModel<String> searchListModel = new SortedListModel<>();
private JList<String> searchList = new JList<>(searchListModel);
private String lastSelectedClass = null;
private ActiveList activeList = ActiveList.FULL;

private enum ActiveList {
FULL, CURRENT, RECENT, SEARCH
}

// Tab names
private static final String ALL_CLASSES = "All classes";
private static final String CURRENT = "Current classes";
private static final String RECENT = "Recent classes";
private static final String SEARCH = "Search";

// GUI buttons
private static final String CREATE_CLASS = "+";
private static final String APPLY_CLASS = "Apply class";
Expand Down Expand Up @@ -101,58 +100,31 @@ public void windowClosing(WindowEvent e) {
tabbedPane = new JTabbedPane();
frame.add(tabbedPane, c);

currentList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
fullList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
fullList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
activeList = ActiveList.FULL;
}
});
recentList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
searchList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

JScrollPane fullListScrollPane = new JScrollPane(fullList);
fullListScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
fullListScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
fullListScrollPane.getVerticalScrollBar().setUnitIncrement(10);
fullListScrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
tabbedPane.add("All classes", fullListScrollPane);

currentList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
currentList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
activeList = ActiveList.CURRENT;
}
});
tabbedPane.add(ALL_CLASSES, fullListScrollPane);

JScrollPane currentListScrollPane = new JScrollPane(currentList);
currentListScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
currentListScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
currentListScrollPane.getVerticalScrollBar().setUnitIncrement(10);
currentListScrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
tabbedPane.add("Current classes", currentListScrollPane);

recentList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
recentList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
activeList = ActiveList.RECENT;
}
});
tabbedPane.add(CURRENT, currentListScrollPane);

JScrollPane recentListScrollPane = new JScrollPane(recentList);
recentListScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
recentListScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
recentListScrollPane.getVerticalScrollBar().setUnitIncrement(10);
recentListScrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
tabbedPane.add("Recent classes", recentListScrollPane);

searchList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
searchList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
activeList = ActiveList.SEARCH;
}
});
tabbedPane.add(RECENT, recentListScrollPane);

JPanel searchPane = new JPanel();
searchPane.setLayout(new BoxLayout(searchPane, BoxLayout.PAGE_AXIS));
Expand Down Expand Up @@ -192,7 +164,7 @@ public void removeUpdate(DocumentEvent e) {
}
});
searchPane.add(searchField);
tabbedPane.add("Search", searchPane);
tabbedPane.add(SEARCH, searchPane);

JButton createClassButton = new JButton(CREATE_CLASS);
createClassButton.addActionListener(this);
Expand Down Expand Up @@ -254,8 +226,10 @@ void saveRecentClassesToPrefs() {
public void actionPerformed(ActionEvent e) {
switch (e.getActionCommand()) {
case (APPLY_CLASS):
String activeList = tabbedPane.getTitleAt(tabbedPane.getSelectedIndex());

switch (activeList) {
case FULL:
case ALL_CLASSES:
lastSelectedClass = fullList.getSelectedValue();
currentListModel.add(lastSelectedClass);
recentListModel.add(lastSelectedClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ public void addToExistingObject() {
return;
}
}

// If no ROI was found, this will add it as a new ROI
ObjRoi objRoi = new ObjRoi(ID, roi, displayIpl.getT() - 1, displayIpl.getZ() - 1,
assignedClass);
Expand All @@ -867,14 +867,14 @@ public void changeObjectClass() {
} catch (Exception e) {
}
assignedClass = classSelector.getLastSelectedClass();

}

// Get selected ROIs
List<ObjRoi> selected = list.getSelectedValuesList();

for (ObjRoi objRoi : selected) {
for (ObjRoi objRoi : selected)
objRoi.setAssignedClass(assignedClass);
}

listModel.redraw();

Expand Down Expand Up @@ -1095,12 +1095,24 @@ public void addToOverlay(ObjRoi objRoi) {
break;
}

switch ((String) overlayMode.getSelectedItem()) {
case OverlayModes.FILL:
overlayRoi.setFillColor(new Color(colour.getRed(), colour.getGreen(), colour.getBlue(), 64));
switch (overlayRoi.getType()) {
// Lines are a special case when it comes to rendering
case Roi.LINE:
case Roi.FREELINE:
case Roi.POLYLINE:
overlayRoi.setStrokeColor(new Color(colour.getRed(), colour.getGreen(), colour.getBlue(), 64));
break;
case OverlayModes.OUTLINES:
overlayRoi.setStrokeColor(colour);

// Everything else is rendered as the normal fill or outlines
default:
switch ((String) overlayMode.getSelectedItem()) {
case OverlayModes.FILL:
overlayRoi.setFillColor(new Color(colour.getRed(), colour.getGreen(), colour.getBlue(), 64));
break;
case OverlayModes.OUTLINES:
overlayRoi.setStrokeColor(colour);
break;
}
break;
}

Expand Down
4 changes: 2 additions & 2 deletions mia-ptbiop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-ptbiop</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-ptbiop</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-samj/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-samj</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-samj</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
4 changes: 2 additions & 2 deletions mia-stardist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
</parent>

<groupId>io.github.mianalysis</groupId>
<artifactId>mia-stardist</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>jar</packaging>
<name>mia-stardist</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>io.github.mianalysis</groupId>
<artifactId>pom-mia</artifactId>
<version>1.6.11</version>
<version>1.6.12</version>
<packaging>pom</packaging>
<name>pom-mia</name>
<url>https://github.com/mianalysis/mia</url>
Expand Down
8 changes: 4 additions & 4 deletions target/site/dependencies.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia Site Renderer 1.8.1 from org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0:dependencies at 2024-10-24 -->
<!-- Generated by Apache Maven Doxia Site Renderer 1.8.1 from org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0:dependencies at 2024-10-29 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Expand All @@ -24,8 +24,8 @@
</div>
<div id="breadcrumbs">
<div class="xleft">
<span id="publishDate">Last Published: 2024-10-24</span>
&nbsp;| <span id="projectVersion">Version: 1.6.11</span>
<span id="publishDate">Last Published: 2024-10-29</span>
&nbsp;| <span id="projectVersion">Version: 1.6.12</span>
</div>
<div class="xright"><a href="./" title="pom-mia">pom-mia</a> </div>
<div class="clear">
Expand Down Expand Up @@ -2529,7 +2529,7 @@ <h2><a name="Project_Dependency_Graph"></a>Project Dependency Graph</h2>
<div class="section">
<h3><a name="Dependency_Tree"></a>Dependency Tree</h3>
<ul>
<li>io.github.mianalysis:pom-mia:pom:1.6.11 <img id="_img1" src="./images/icon_info_sml.gif" alt="[Information]" onclick="toggleDependencyDetails( '_dep0', '_img1' );" style="cursor: pointer; vertical-align: text-bottom;"></img><div id="_dep0" style="display:none">
<li>io.github.mianalysis:pom-mia:pom:1.6.12 <img id="_img1" src="./images/icon_info_sml.gif" alt="[Information]" onclick="toggleDependencyDetails( '_dep0', '_img1' );" style="cursor: pointer; vertical-align: text-bottom;"></img><div id="_dep0" style="display:none">
<table border="0" class="bodyTable">
<tr class="a">
<th>pom-mia</th></tr>
Expand Down

0 comments on commit 905fcac

Please sign in to comment.