Last active
October 27, 2021 14:13
-
-
Save odinsbane/eeb10ebce9c608034f4af7fe091b14e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function snapshotsThreeSixty(steps){ | |
total = 1260 | |
mf3d = controls.getMeshFrame3D(); | |
stack = 0; | |
perStep = 1260/steps; | |
for(var i = 0; i<steps; i++){ | |
mf3d.rotateView(perStep, 0); | |
img = mf3d.snapShot(); | |
proc = new ColorProcessor(img); | |
if(stack==0){ | |
stack = new ImageStack(proc.getWidth(), proc.getHeight()); | |
} | |
stack.addSlice(proc); | |
} | |
plus = new ImagePlus(); | |
plus.setStack(stack); | |
plus.setTitle("rotating snapshot"); | |
plus.show(); | |
} | |
function zoomInMovie(steps){ | |
mf3d = controls.getMeshFrame3D(); | |
stack = 0; | |
for(var i = 0; i<steps; i++){ | |
mf3d.getCanvas().zoomIn(); | |
img = mf3d.snapShot(); | |
proc = new ColorProcessor(img); | |
if(stack==0){ | |
stack = new ImageStack(proc.getWidth(), proc.getHeight()); | |
} | |
stack.addSlice(proc); | |
} | |
plus = new ImagePlus(); | |
plus.setStack(stack); | |
plus.setTitle("zoom-in-snapshot"); | |
plus.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment