Skip to content

Commit

Permalink
Fixes some intellij warnings.
Browse files Browse the repository at this point in the history
Removes (lots of) unused pieces of code.
  • Loading branch information
NicoKiaru committed May 1, 2024
1 parent 3f383ec commit 1fbadce
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 1,726 deletions.
15 changes: 6 additions & 9 deletions src/main/java/ch/epfl/biop/coloc/JACoP_B.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@

package ch.epfl.biop.coloc;

import java.awt.*;
import java.awt.Color;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -72,8 +71,6 @@
import ij.process.ImageProcessor;
import net.imagej.ImageJ;

import javax.script.ScriptException;

public class JACoP_B implements PlugIn {

private static final String PREFIX = "jacop.b.";
Expand Down Expand Up @@ -201,7 +198,7 @@ private void runColoc() {
ImageColocalizer ic;

// Store results, as there might be many runs of ImageColocalizer
List<ImagePlus> results = new ArrayList<ImagePlus>();
List<ImagePlus> results = new ArrayList<>();

// The ROI we need to haul around in case it's there
if(imp.getRoi() != null)
Expand All @@ -224,7 +221,7 @@ private void runColoc() {
if(hasRoiSets) roi = (Roi) rm.getRoi(r).clone();

// Get some data on the ROI, is there one? Does it have a name?
String roiName = null;
String roiName;
if (roi != null) {
roiName = roi.getName();
if (roiName == null) {
Expand Down Expand Up @@ -388,7 +385,7 @@ private ImagePlus runAnalysis(ImageColocalizer ic) {
int columns = -1;

// Get the images and make a montage
ArrayList<ImagePlus> imgs = new ArrayList<ImagePlus>();
ArrayList<ImagePlus> imgs = new ArrayList<>();

// Vertical montage
if(is_montage_vertical) {
Expand Down Expand Up @@ -592,7 +589,7 @@ private Boolean mainDialog() {
d.addNumericField("Channel_A", channelA, 0);
d.addNumericField("Channel_B", channelB, 0);

List<String> thrs= new ArrayList<String>(Arrays.asList(Thresholder.methods));
List<String> thrs= new ArrayList<>(Arrays.asList(Thresholder.methods));
thrs.add("Costes Auto-Threshold");
thrs.add("Use Manual Threshold Below");

Expand Down Expand Up @@ -763,7 +760,7 @@ private Boolean advancedDialog() {
return true;
}

public static void main(String[] args) throws ScriptException, FileNotFoundException {
public static void main(String[] args) {
// set the plugins.dir property to make the plugin appear in the Plugins menu
Class<?> clazz = JACoP_B.class;
String url = clazz.getResource("/" + clazz.getName().replace('.', '/') + ".class").toString();
Expand Down
173 changes: 0 additions & 173 deletions src/main/java/ch/epfl/biop/coloc/utils/ColocOutput.java

This file was deleted.

Loading

0 comments on commit 1fbadce

Please sign in to comment.