Skip to content

Commit

Permalink
Merge pull request #72 from kmdouglass/ADD_Image_Abstraction
Browse files Browse the repository at this point in the history
Add image abstraction
  • Loading branch information
kmdouglass committed Feb 11, 2018
2 parents 50c86a0 + 91a3dd1 commit 73c0c1c
Show file tree
Hide file tree
Showing 35 changed files with 1,449 additions and 378 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
### Added
- An RPC server was created that allows for remote control of the
simulation over the network.
- A new image abstraction layer called **ImageS** that separates image
data logic and display from the SASS core code.

### Changed
- The package layout was restructured and simplified to make it easier
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<project name="SASS" default="default" basedir=".">
<description>Builds, tests, and runs the project SASS.</description>
<import file="nbproject/build-impl.xml"/>
<property name="pluginsDir" location="/home/douglass/apps/Fiji.app/plugins" />
<property name="pluginsDir" location="/home/kmdouglass/apps/Fiji.app/plugins" />
<property name="store.jar.name" value="SASS_0.6.1.jar"/>
<property name="store.dir" value="store"/>
<property name="store.jar" value="${store.dir}/${store.jar.name}"/>
Expand Down
31 changes: 15 additions & 16 deletions nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is divided into following sections:
- cleanup
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="SASS-dev-impl">
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="SASS-impl">
<fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
Expand All @@ -46,8 +46,8 @@ is divided into following sections:
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.6"/>
<property name="default.javac.target" value="1.6"/>
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
<property file="nbproject/configs/${config}.properties"/>
Expand Down Expand Up @@ -76,7 +76,7 @@ is divided into following sections:
<and>
<isset property="javac.profile"/>
<length length="0" string="${javac.profile}" when="greater"/>
<matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/>
<matches pattern="1\.[89](\..*)?" string="${javac.source}"/>
</and>
</condition>
<condition property="do.archive">
Expand Down Expand Up @@ -156,7 +156,6 @@ is divided into following sections:
<property name="application.args" value=""/>
<property name="source.encoding" value="${file.encoding}"/>
<property name="runtime.encoding" value="${source.encoding}"/>
<property name="manifest.encoding" value="${source.encoding}"/>
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
<and>
<isset property="javadoc.encoding"/>
Expand Down Expand Up @@ -450,7 +449,7 @@ is divided into following sections:
</fileset>
</union>
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
<testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="SASS-dev" testname="TestNG tests" workingDir="${work.dir}">
<testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="SASS" testname="TestNG tests" workingDir="${work.dir}">
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
<propertyset>
<propertyref prefix="test-sys-prop."/>
Expand Down Expand Up @@ -601,7 +600,7 @@ is divided into following sections:
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
<isset property="test.method"/>
</condition>
<condition else="-suitename SASS-dev -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<condition else="-suitename SASS -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<matches pattern=".*\.xml" string="@{testClass}"/>
</condition>
<delete dir="${build.test.results.dir}" quiet="true"/>
Expand Down Expand Up @@ -841,7 +840,7 @@ is divided into following sections:
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
Expand All @@ -853,7 +852,7 @@ is divided into following sections:
</target>
<target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
<j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
</jar>
</presetdef>
Expand Down Expand Up @@ -893,7 +892,7 @@ is divided into following sections:
<delete file="${built-jar.properties}" quiet="true"/>
</target>
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
<echo level="warn" message="Cycle detected: SASS-dev was already built"/>
<echo level="warn" message="Cycle detected: SASS was already built"/>
</target>
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
<mkdir dir="${build.dir}"/>
Expand Down Expand Up @@ -976,23 +975,23 @@ is divided into following sections:
</target>
<target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
<copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
<copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
</target>
<target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
<manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<manifest file="${tmp.manifest.file}" mode="update">
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</target>
<target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
<manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<manifest file="${tmp.manifest.file}" mode="update">
<attribute name="Profile" value="${javac.profile}"/>
</manifest>
</target>
<target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
<basename file="${application.splash}" property="splashscreen.basename"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
<manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
<manifest file="${tmp.manifest.file}" mode="update">
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
</manifest>
</target>
Expand Down Expand Up @@ -1187,7 +1186,7 @@ is divided into following sections:
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<startprofiler/>
<antcall target="run-test-with-main"/>
<antcal target="run-test-with-main"/>
</target>
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
Expand Down Expand Up @@ -1378,7 +1377,7 @@ is divided into following sections:
<delete file="${built-clean.properties}" quiet="true"/>
</target>
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
<echo level="warn" message="Cycle detected: SASS-dev was already built"/>
<echo level="warn" message="Cycle detected: SASS was already built"/>
</target>
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
<mkdir dir="${build.dir}"/>
Expand Down
6 changes: 3 additions & 3 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ build.xml.script.CRC32=1c9a5f06
build.xml.stylesheet.CRC32=[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=e8261fd9
nbproject/build-impl.xml.script.CRC32=a5d77285
nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48
nbproject/build-impl.xml.data.CRC32=dd76ab7f
nbproject/build-impl.xml.script.CRC32=ca3d274f
nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48

1 change: 1 addition & 0 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.reference.gson-2.8.2.jar=src/lib/javadocs/gson-2.8.2-javadoc.jar
javadoc.reference.ij-1.50e.jar=/home/kmdouglass/apps/Fiji.app/javadocs/ij
javadoc.reference.jfreechart-1.0.19.jar=/home/douglass/src/jfreechart-1.0.19/javadoc
javadoc.reference.libthrift-0.11.0.jar=src/lib/libthrift-0.11.0-javadoc.jar
javadoc.splitindex=true
Expand Down
3 changes: 1 addition & 2 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>SASS-dev</name>
<name>SASS</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
Expand All @@ -13,4 +13,3 @@
</data>
</configuration>
</project>

5 changes: 0 additions & 5 deletions scripts/example_Gibson_Lanni_PSF.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,7 @@ for (i=0;i<1000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately



7 changes: 0 additions & 7 deletions scripts/example_dSTORM.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,5 @@ for (i=0;i<100;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately



6 changes: 1 addition & 5 deletions scripts/example_grid_2d_fluorophores.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ch.epfl.leb.sass.models.components.*;
import ch.epfl.leb.sass.models.psfs.internal.Gaussian2D;
import ch.epfl.leb.sass.models.fluorophores.internal.commands.GenerateFluorophoresGrid2D;
import ch.epfl.leb.sass.utils.RNG;
import ch.epfl.leb.sass.utils.images.ImageS;

// The seed determines the outputs of the random number generator.
RNG.setSeed(42);
Expand Down Expand Up @@ -114,9 +115,4 @@ for (i=0;i<10000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately
7 changes: 0 additions & 7 deletions scripts/example_grid_3d_fluorophores.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,3 @@ for (i=0;i<10000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately

10 changes: 5 additions & 5 deletions scripts/example_loggers.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ for (i=0;i<10000;i++) {
}

// Save the stack
generator.saveStack(new File("generated_stack.tif"));
//generator.saveStack(new File("generated_stack.tif"));

// Save the fluorophore positions.
positionLogger.setFilename("fluorophore_positions.csv");
positionLogger.saveLogFile();
//positionLogger.setFilename("fluorophore_positions.csv");
//positionLogger.saveLogFile();

// Save the state transitions
stateLogger.setFilename("state_transitions.csv");
stateLogger.saveLogFile();
//stateLogger.setFilename("state_transitions.csv");
//stateLogger.saveLogFile();

9 changes: 0 additions & 9 deletions scripts/example_random_2d_fluorophores.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,3 @@ for (i=0;i<10000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately



6 changes: 0 additions & 6 deletions scripts/example_random_3d_fluorophores.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ for (i=0;i<10000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately



5 changes: 0 additions & 5 deletions scripts/example_run_generator_moving.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ for (i=0;i<10000;i++) {

// save and show; uncomment these lines to save and display stack
//generator.saveStack(new File("generated_stack.tif"));
//import ij.ImagePlus;
//ImagePlus ip = new ImagePlus("Simulation output", generator.getStack());
//ip.show();
//ip.updateAndRepaintWindow();

//System.exit(0); // uncomment if you want termination immediately



Loading

0 comments on commit 73c0c1c

Please sign in to comment.