Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
230322 ExM script for chloroplast and grana detection
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
Bos, Peter1
230322 ExM script for chloroplast and grana detection
Commits
e230dcc8
Commit
e230dcc8
authored
2 years ago
by
Bos, Peter1
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
2e99c5f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Changepixelsize.ijm
+42
-0
42 additions, 0 deletions
Changepixelsize.ijm
with
42 additions
and
0 deletions
Changepixelsize.ijm
0 → 100644
+
42
−
0
View file @
e230dcc8
// get image IDs of all open images
input_path = getDirectory("input files");
filelist = getFileList(input_path);
dir = getDirectory("Where do you want to save images?");
//directory = getDirectory("Individual images");
Selectchannel = 1;
togovoxel = 0.06
togovoxel_Z = 0.06
for (Rijn = 0; Rijn < filelist.length; Rijn++) {
open(input_path + filelist[Rijn]);
title = getTitle();
getDimensions( width, height, channels, slices, frames );
helpwithchannel = channels + 1;
if (channels >1) {
run("Split Channels");
for (waal = 1; waal < helpwithchannel ; waal++) {
if (waal != Selectchannel) {
selectWindow("C" + waal + "-" + title);
close();
}
}
}
getDimensions( width, height, channels, slices, frames );
fullwidth = width;
fullheight = height;
getVoxelSize(width, height, depth, unit);
voxwidth = width;
voxheight = height;
voxdepth = depth;
pixxy = (voxwidth/togovoxel) * fullheight;
pixz = (voxdepth/togovoxel_Z)*slices;
//Choose if you want to interpolate in Z (second line) or not (first line)
run("Size...", "width=" + pixxy + " height=" + pixxy + " constrain average interpolation=Bilinear");
//run("Size...", "width=" + pixxy + " height=" + pixxy + " depth=" + pixz + " constrain average interpolation=Bilinear");
saveAs("tiff", dir + title);
//run("Image Sequence... ", "select=["+ directory + "] dir=[" + directory + "] format=TIFF");
run("Close All");
}
showMessage("Finito", "I hope I did my job well");
\ No newline at end of file
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