Skip to content

Commit

Permalink
Merge branch 'Tevemadar:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Tevemadar authored Mar 25, 2024
2 parents d03d92c + cc4bf13 commit a7bf9e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions slicer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function dataslice(ouv,width,height){
let [ox,oy,oz,ux,uy,uz,vx,vy,vz]=ouv;
if(arguments.length===1){
width=Math.round(Math.sqrt(ux*ux+uy*uy+uz*uz));
height=Math.round(Math.sqrt(ux*vx+vy*vy+vz*vz));
width=Math.round(Math.hypot(ux,uy,uz));
height=Math.round(Math.hypot(vx,vy,vz));
}
let data=new Uint16Array(width*height);
let xdim=atlas.xdim;
Expand All @@ -27,8 +27,8 @@ function dataslice(ouv,width,height){
function grayslice(ouv,width,height){
let [ox,oy,oz,ux,uy,uz,vx,vy,vz]=ouv;
if(arguments.length===1){
width=Math.round(Math.sqrt(ux*ux+uy*uy+uz*uz));
height=Math.round(Math.sqrt(ux*vx+vy*vy+vz*vz));
width=Math.round(Math.hypot(ux,uy,uz));
height=Math.round(Math.hypot(vx,vy,vz));
}
let data=new Uint8Array(width*height);
let xdim=atlas.xdim;
Expand Down

0 comments on commit a7bf9e9

Please sign in to comment.