Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IJ-macros
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
Zahra Alirezaeizanjani
IJ-macros
Commits
1e532a76
Commit
1e532a76
authored
8 years ago
by
Marius Hintsche
Browse files
Options
Downloads
Patches
Plain Diff
remove contrast stretching of projections
parent
4b1b2d8b
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
GroupedProjections.ijm
+6
-5
6 additions, 5 deletions
GroupedProjections.ijm
with
6 additions
and
5 deletions
GroupedProjections.ijm
+
6
−
5
View file @
1e532a76
...
...
@@ -31,10 +31,8 @@ stackMem = getWidth()*getHeight()*bitDepth()/8*subStackSize;
if (stackMem > maxMem) {
exit("Substack is too large for available memory");
}
//FIXME calculate iMax correctly for overlaps
//FIXME calculate iMax correctly for
non zero
overlaps
iMax = floor(nSlices()/subStackSize)+1;
//TODO allocate stack memory before running the loop. The programm will then
// fail right in the beginning if not enough memory is available.
methodPrefix = replace(method,' ','-');
resultName = methodPrefix;
inputInfo = getImageInfo;
...
...
@@ -87,7 +85,7 @@ for (i=0; i<iMax; i++) {
}
selectImage(resultName);
setSlice(1);
run("Enhance Contrast...", "saturated=0.4 process_all");
//
run("Enhance Contrast...", "saturated=0.4 process_all");
if (saveToDisk) {
saveAs("Tiff",basePath+inputName+"_"+resultName+"-grouped");
}
...
...
@@ -98,6 +96,7 @@ walltime = (tStop-tStart)/1000/60;
print("Done! (took "+d2s(walltime,1)+" min to process "+i+" substacks.");
print(progressTitle, "\\Close");
//Subfunctions
function calculateProjection(iStart,iStop,resultTitle,method) {
run("Duplicate...", "title="+resultTitle+" duplicate range="+iStart+"-"+iStop);
if (nSlices>1) {
...
...
@@ -105,12 +104,14 @@ function calculateProjection(iStart,iStop,resultTitle,method) {
}
}
//add projection in2 to existing result stack in2
function addSlice(resultTitle,in1,in2) {
run("Concatenate...", " title=["+resultTitle+"] image1="+in1+" image2="+in2);
showStatus("Grouped Stack Proj. ("+i+"/"+iMax+"):");
showProgress(i/iMax);
}
//get string representation of progress bar with p1 out of p2 done
function getBar(p1, p2) {
n = 20;
bar1 = "--------------------";
...
...
@@ -120,4 +121,4 @@ function getBar(p1, p2) {
if (index>n-1) index = n-1;
return substring(bar2, 0, index) + substring(bar1, index+1, n);
}
}
\ 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