Skip to content
Open
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
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Compiled files
/MT2-project-ImageProcessing/plugins/
*.class

# Archives
*.zip
*.tar.gz
*.tar
*.rar

# macOS cache files
.DS_Store

# Temporary files
*.tmp
Binary file removed MT2-project-ImageProcessing.zip
Binary file not shown.
10 changes: 10 additions & 0 deletions MT2-project-ImageProcessing/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions MT2-project-ImageProcessing/.idea/libraries/ij.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions MT2-project-ImageProcessing/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions MT2-project-ImageProcessing/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions MT2-project-ImageProcessing/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions MT2-project-ImageProcessing/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions MT2-project-ImageProcessing/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions MT2-project-ImageProcessing/MT2-project-ImageProcessing.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/plugins" />
<output-test url="file://$MODULE_DIR$/plugins" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="ij" level="project" />
</component>
</module>
Binary file added MT2-project-ImageProcessing/ij.jar
Binary file not shown.
Binary file added MT2-project-ImageProcessing/img/cells.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions MT2-project-ImageProcessing/macros/AA_ReadMe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
This folder contains ImageJ macros. You open a macro file using the
File->Open command and run it by pressing ctrl-r (File->Run Macro).
You can also open a macro file by dragging and dropping it on the
main ImageJ window. You can run a small piece of macro code by selecting
it in the editor and typing ctrl-r. Some of the files (e.g., MacroSet.txt)
contain multiple macros that are installed in the editor's "Macros" menu.

Macros located in the ImageJ/plugins folder, with names containing an
an underscore ("_") or ending in ".ijm", are installed in the Plugins menu.
Examples of such macros can be found in ImageJ/plugins/Examples/_Macros.

Macros and macro tools in the ImageJ/macros/StartupMacros.txt file are
installed in the Plugins>Macros submenu and in the toolbar when ImageJ
starts. Macros can be assigned keyboard shortcuts. For examples,
refer to the macros/MacroSet.ijm file. Note that macro shortcuts only
work when an image window or the ImageJ window has focus.

The tools folder contains tool macros that are added to ImageJ's tool
bar when you open the file. The toolsets folder contains macro sets
that are installed in the toolbar's ">>" menu when ImageJ starts.

Information about the macro language (including a 48 page PDF),
a list of the built in macro functions and more example macros are
available at

http://imagej.nih.gov/ij/developer
9 changes: 9 additions & 0 deletions MT2-project-ImageProcessing/macros/About Startup Macros
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Macros and macro tools in ImageJ/macros/StartupMacros.txt
are automatically installed in the Plugins>Macros menu and
in the toolbar when ImageJ starts. Use the Plugins>Macros>
Startup Macros... command to display or edit this file.

More information is available at:
<http://imagej.nih.gov/ij/developer>


26 changes: 26 additions & 0 deletions MT2-project-ImageProcessing/macros/AnimatedGaussianBlur.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Animated Gaussian Blur
//
// Creates a 51 frame stack containing a copy of the current
// image plus copies blurred using the Gaussian Blur filter
// with the radius varying between 1 and 50.

if (nImages==0)
run("Blobs (25K)");
inc=1; max=50;
run("Select All");
run("Copy");
setBatchMode(true);
run("Duplicate...", "title=[Animated Gaussian Blur]");
slice = 0;
for (radius=inc; radius<=max; radius+=inc) {
run("Add Slice");
run("Paste");
run("Gaussian Blur...", "slice radius="+radius);
setMetadata("radius="+radius);
showProgress(radius, max/inc);
}
setSlice(1);
setMetadata("original");
setBatchMode(false);
run("Select None");
doCommand("Start Animation")
12 changes: 12 additions & 0 deletions MT2-project-ImageProcessing/macros/AnimationMacros.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// These macros allow you to use the 0, 1, 2, etc.
// keys to slow down or speed up an animation.

macro "1 fps [1]" {run("Animation Options...", "speed=1 start");}
macro "2 fps [2]" {run("Animation Options...", "speed=2 start");}
macro "5 fps [3]" {run("Animation Options...", "speed=5 start");}
macro "7.5 fps [4]" {run("Animation Options...", "speed=7.5 start");}
macro "10 fps [5]" {run("Animation Options...", "speed=10 start");}
macro "15 fps [6]" {run("Animation Options...", "speed=15 start");}
macro "20 fps [7]" {run("Animation Options...", "speed=20 start");}
macro "30 fps [8]" {run("Animation Options...", "speed=30 start");}
macro "60 fps [9]" {run("Animation Options...", "speed=60 start");}
12 changes: 12 additions & 0 deletions MT2-project-ImageProcessing/macros/BatchModeCalculator.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This macro demonstrates how to use
// the Image Calculator in batch mode.

setBatchMode(true);
run("Clown (14K)");
img1 = getTitle();
run("Lena (68K)");
img2 = getTitle();
run("Image Calculator...",
"image1=&img1 operation=Average image2=&img2 create");
run("Rename...", "title=Sum");
setBatchMode(false);
16 changes: 16 additions & 0 deletions MT2-project-ImageProcessing/macros/BatchModeTest.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This macro is an example that shows how to process
// an image in batch mode and then display the result.

setBatchMode(true);
run("Clown (14K)");
makeRectangle(104, 72, 150, 159);
run("Fill");
run("Select None");
run("Rotate... ", "angle=15 interpolation=Bilinear");
run("Smooth");
run("Find Edges");
run("Add...", "value=25");
run("Gaussian Blur...", "radius=2");
run("Median...", "radius=1");
run("Unsharp Mask...", "gaussian=2 mask=0.60");
setBatchMode(false); // displays the image
20 changes: 20 additions & 0 deletions MT2-project-ImageProcessing/macros/Calculations.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// The macro interpreter will evaluate expressions and
// display the results without having to use the print()
// function or having to put a simicolon at the end
// of each line.

// Press ctrl+r (Macros>Run Macro) to evaluate the
// following expressions. Select one or more lines and
// press ctrl+r to evaluate just the selected lines.
// Press ctrl+e (Macros>Evaluate Line) to evaluate the
// current line.

2+2
(2.5+1)/3
cos(0.7*PI)
"2^10=" + pow(2,10)
"log(0)=" + log(0)
"100 in hex=" + toHex(100)
"FF in decimal=" + 0xff;
r = 10
"radius=" + r + "mm, area=" + round(PI*r*r) + "mm^2"
44 changes: 44 additions & 0 deletions MT2-project-ImageProcessing/macros/CompositeSelections.ijm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// "CompositeSelections"
// This macro demonstrates how to create composite selections using
// makeOval(), makeRectangle() and makePolygon(), in combination
// with setKeyDown("shift") (to add selections) and setKeyDown("alt")
// (to subtract selections).

width=400; height=400;
saveSettings;
run("Colors...", "selection=red");
newImage("Composite Selections", "8-bit White", 400, 400, 1);
setLocation(screenWidth/2-width/2, screenHeight/10);
makeOval(110, 94, 156, 156);
setKeyDown("alt");
makeOval(144, 129, 87, 87);
show();

makeOval(62, 40, 55, 55);
setKeyDown("shift");
makeOval(246, 49, 60, 60);
setKeyDown("shift");
makeOval(285, 200, 60, 60);
setKeyDown("shift");
makeRectangle(136, 254, 58, 58);
setKeyDown("shift");
makeRectangle(31, 150, 58, 58);
show();

makePolygon(84,182,143,127,212,87,260,124,301,202,290,255,247,253,214,188,190,195,134,249,87,247,116,201);
setKeyDown("alt");
makePolygon(228,136,158,151,137,189,143,204,193,171,243,183,260,174);
setKeyDown("shift");
makePolygon(264,70,285,48,311,43,369,76,363,189,322,186,300,140,271,116);
show();

restoreSettings;


function show() {
for (i=0; i<10; i++) {
run("Invert");
wait(150);
}
wait(1000);
}
Loading