Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IJ-macros
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marius Hintsche
IJ-macros
Commits
41024b84
Commit
41024b84
authored
8 years ago
by
Marius Hintsche
Browse files
Options
Downloads
Patches
Plain Diff
add avi export macro
parent
1e532a76
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exportAvi.ijm
+28
-0
28 additions, 0 deletions
exportAvi.ijm
with
28 additions
and
0 deletions
exportAvi.ijm
0 → 100644
+
28
−
0
View file @
41024b84
//This macro should be called in Fiji's headless mode e.g.
// fiji --headless -macro /path-to-macro.ijm /path-to-file.tif
// or by runMacro(macro, arg)
// (apparently file path must be absolute)
frameRate = 20; // set fixed frame rate TODO: read time resolution and calculate frate
outExtension = ".avi";
inFile = getArgument();
dotIndex = lastIndexOf(inFile, ".");
if (dotIndex >= 0) {
baseName = substring(inFile, 0, dotIndex);
}
outFile = baseName+outExtension;
// escape spaces in path with \ and "" // does not work!
//outFile = "\"" + outFile + "\"";
//outFile = replace(outFile, " ", "\\\\\\\\ ");
if ( indexOf(outFile," ") >= 0 ) {
exit("Input path must no contain whitespace!");
}
//print("will export to "+outFile);
setBatchMode(true);
open(inFile);
run("8-bit");
run("AVI... ", "compression=JPEG frame="+frameRate+" save="+outFile);
close();
setBatchMode(false);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment