Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #192

Merged
merged 5 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,11 @@
{
"configurations": [
{
"type": "java",
"name": "AnalysisReader",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.process.analysishandling.AnalysisReader",
"projectName": "mia-core"
},
{
"type": "java",
"name": "MinimalExample",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.module.MinimalExample",
"projectName": "mia-modules"
},
{
"type": "java",
"name": "MinimalExample",
"request": "launch",
"mainClass": "MinimalExample",
"projectName": "pom-mia"
},
{
"type": "java",
"name": "MinimalExample",
"request": "launch",
"mainClass": "io.github.mianalysis.example.MinimalExample",
"projectName": "mia-examples"
},
{
"type": "java",
"name": "MIA",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.MIA",
"projectName": "mia-core"
},
{
"type": "java",
"name": "MIA_",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.MIA_",
"projectName": "mia-plugin"
},
{
"type": "java",
"name": "MIA",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.MIA",
"projectName": "mia"
},
{
"type": "java",
"name": "RunScript",
"request": "launch",
"mainClass": "io.github.mianalysis.mia.module.script.RunScript",
"projectName": "mia"
}
]
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package io.github.mianalysis.mia.process.houghtransform.transforms;

import java.util.ArrayList;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.process.ImageProcessor;
import io.github.mianalysis.mia.process.houghtransform.accumulators.CircleAccumulator;
import io.github.mianalysis.mia.process.string.CommaSeparatedStringInterpreter;
Expand All @@ -17,23 +13,6 @@
* Created by sc13967 on 12/01/2018.
*/
public class CircleTransform extends AbstractTransform {
public static void main(String[] args) {
new ImageJ();
ImagePlus ipl = IJ.openImage("C:/Users/steph/Desktop/TEST_HoughCircle.tif");
ImageProcessor ipr = ipl.getProcessor();

CircleTransform transform = new CircleTransform(ipr, new String[]{"150-300-5","100-200","60-70-5"});
transform.setnThreads(4);
transform.run();

ArrayList<double[]> objects = transform.getObjects(10000, 100);
transform.addDetectedObjectsOverlay(ipl, objects);

ipl.show();
IJ.runMacro("waitForUser");

}

public CircleTransform(ImageProcessor ipr, String[] parameterRanges) {
super(ipr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.process.ImageProcessor;
import io.github.mianalysis.mia.process.houghtransform.accumulators.RectangleAccumulator;
import io.github.mianalysis.mia.process.string.CommaSeparatedStringInterpreter;
Expand All @@ -16,26 +13,6 @@
* Created by sc13967 on 12/01/2018.
*/
public class RectangleTransform extends AbstractTransform {
public static void main(String[] args) {
new ImageJ();
ImagePlus ipl = IJ.openImage("C:/Users/steph/Desktop/TEST_HoughRectangle.tif");
ImageProcessor ipr = ipl.getProcessor();
String[] parameterRanges = new String[] { "0-end", "0-end", "70", "130-170-5", "0-360-60" };

RectangleTransform transform = new RectangleTransform(ipr, parameterRanges);
transform.setnThreads(4);
transform.run();

transform.getAccumulatorAsImage().show();

// ArrayList<double[]> objects = transform.getObjects(8000, 500);
// transform.addDetectedObjectsOverlay(ipl, objects);

ipl.show();
IJ.runMacro("waitForUser");

}

public RectangleTransform(ImageProcessor ipr, String[] parameterRanges) {
super(ipr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
* Created by sc13967 on 12/01/2018.
*/
public class SphereTransform extends AbstractTransform {

// public static void main(String[] args) {
// new ImageJ();
// ImagePlus ipl = IJ.openImage("C:/Users/steph/Desktop/TEST_HoughSphere.tif");
// ImageStack ist = ipl.getStack();
// String[] paramRanges = new String[] { "0-end", "0-end", "0-end", "15-25-1" };
// SphereTransform sht = new SphereTransform(ist, paramRanges);
// sht.run();
// sht.getAccumulatorAsImage().show();
// sht.addDetectedObjectsOverlay(ipl, sht.getObjects(10, 100));
// ipl.show();
// }

public SphereTransform(ImageStack ist, String[] parameterRanges) {
super(ist);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@ public class Skeleton extends VertexCollection {
private double longestDistance;
private ArrayList<Vertex> longestPath;


// public static void main(String[] args) {
// new ImageJ();
//
// ImagePlus ipl = IJ.openImage("C:\\Users\\sc13967\\Downloads\\FakeFish.tif");
// ipl.show();
//
// Skeleton skeleton = new Skeleton(ipl);
//
// LinkedHashSet<Vertex> longestPath = skeleton.getLongestPath();
// CurvatureCalculator curvatureCalculator = new CurvatureCalculator(longestPath);
// curvatureCalculator.setFittingMethod(CurvatureCalculator.FittingMethod.LOESS);
// curvatureCalculator.setLoessNNeighbours(10);
// curvatureCalculator.setLoessIterations(10000);
// curvatureCalculator.setLoessAccuracy(1);
// TreeMap<Double,Double> curvature = curvatureCalculator.getCurvature();
// curvatureCalculator.showOverlay(ipl,new int[]{1,1,1},2);
//
// }

public Skeleton(ImagePlus ipl) {
for (int x=0;x<ipl.getWidth();x++) {
for (int y=0;y<ipl.getHeight();y++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
import java.util.regex.Pattern;

public class CommaSeparatedStringInterpreter {
public static void main(String[] args) {
firstValue("7-(end-3)");
// for (int i:interpretIntegers("20-(end-3)", true, 12)) {
// System.out.println(i);
// }
}

public static int firstValue(String range) {
Matcher matcher = Pattern.compile("[0-9]+").matcher(range);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
package io.github.mianalysis.mia.process.voxel;

import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.ImageStack;

public class SphereShell extends AbstractSphere {
public enum Connectivity {
SIX, TWENTY_SIX;
}

public static void main(String[] args) {
SphereShell sphereShell = new SphereShell(46,Connectivity.TWENTY_SIX);
int[] x = sphereShell.getX();
int[] y = sphereShell.getY();
int[] z = sphereShell.getZ();

new ImageJ();
ImagePlus ipl = IJ.createImage("", 100, 100, 100, 8);
ImageStack ist = ipl.getStack();
for (int i = 0; i < x.length; i++) {
ist.setVoxel(x[i] + 50, y[i] + 50, z[i] + 50, 255);
}
ipl.show();
}

public SphereShell(int r, Connectivity connectivity) {
for (int xx = -r; xx < r+1; xx++) {
for (int yy = -r; yy < r+1; yy++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
package io.github.mianalysis.mia.process.voxel;

import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.ImageStack;

public class SphereSolid extends AbstractSphere {
public static void main(String[] args) {
SphereSolid sphereSolid = new SphereSolid(45);
int[] x = sphereSolid.getX();
int[] y = sphereSolid.getY();
int[] z = sphereSolid.getZ();

new ImageJ();
ImagePlus ipl = IJ.createImage("", 100, 100, 100, 8);
ImageStack ist = ipl.getStack();
for (int i = 0; i < x.length; i++) {
ist.setVoxel(x[i] + 50, y[i] + 50, z[i] + 50, 255);
}
ipl.show();
}

public SphereSolid(int r) {
for (int xx = -r; xx < r; xx++) {
for (int yy = -r; yy < r; yy++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ private void initComponents() {
}
// </editor-fold>//GEN-END:initComponents

public static void main(String args[]) {
StatusDialog dialog = new StatusDialog(new JFrame(), "Title", "Caption");
dialog.setVisible(true);
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel lblCaption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@
import signalprocesser.voronoi.statusstructure.VLinkedNode;

public class VoronoiAlgorithm {

/* ********************************************************* */
// Test Main Function

public static void main(String[] args) {
VoronoiTest.main(args);
}


private VoronoiAlgorithm() { }

/* ********************************************************* */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,7 @@ public class VoronoiTest extends javax.swing.JFrame {
private TestRepresentationWrapper representationwrapper = new TestRepresentationWrapper();

private AbstractRepresentation representation;

public static void main(String args[]) {
// Set look and feel
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
displayError(null, e);
}

// Load the application
VoronoiTest frame = new VoronoiTest();
frame.setVisible(true);
}

/** Creates new form MainFrame */
public VoronoiTest() {
// Inital components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,7 @@ public void windowClosed(java.awt.event.WindowEvent evt) {
private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
//System.exit(0);
}//GEN-LAST:event_formWindowClosed

public static void main(String args[]) {
DebugTree app = new DebugTree(new javax.swing.JFrame());
app.setVisible(true);
VInternalNode node = new VInternalNode();
VLeafNode leaf1 = new VLeafNode(new VSiteEvent(new VPoint(1,2)));
VLeafNode leaf2 = new VLeafNode(new VSiteEvent(new VPoint(1,2)));
node.setLeft(leaf1);
node.setRight(leaf2);
app.setRootNode(node, 10);
}


// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables

Expand Down
Loading
Loading