Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make all three view as square and show them vertically or horizontally #193

Open
amir201808 opened this issue Mar 27, 2020 · 3 comments
Open

Comments

@amir201808
Copy link

Hello,

Is there any way I can make all three views as equal size square and show them vertically with space.

Please help me

@amir201808
Copy link
Author

amir201808 commented Mar 31, 2020

I found the code which makes them of equal size. I am not able to make them vertically aligned.
calculateScreenSliceTransforms() method inside papaya.js

: (
          this.getTransformParameters(this.mainImage, this.viewerDim, !0, 2),    // main view
           this.mainImage.screenTransform[0][2] += this.mainImage.screenOffsetX = 0, 
           this.mainImage.screenTransform[1][2] += this.mainImage.screenOffsetY = 0, 

           // this.viewerDim = 400,
           this.getTransformParameters(this.mainImage, this.viewerDim, !0, 2),    // main view
           
           this.lowerImageBot.screenTransform[0][2] += this.lowerImageBot.screenOffsetX = 0, 
           this.lowerImageBot.screenTransform[1][2] += this.lowerImageBot.screenOffsetY = 0, 
           
           
           this.getTransformParameters(this.lowerImageBot, this.viewerDim, !0, 2), // right view
          
           this.lowerImageBot.screenTransform[0][2] +=
           this.lowerImageBot.screenOffsetX = this.viewerDim + papaya.viewer.Viewer.GAP, 
           this.lowerImageBot.screenTransform[1][2] += this.lowerImageBot.screenOffsetY = (this.viewerDim - papaya.viewer.Viewer.GAP) / 2
           + papaya.viewer.Viewer.GAP, 
           
            this.getTransformParameters(this.lowerImageTop, this.viewerDim, !0, 2), 
            this.lowerImageTop.screenTransform[0][2] += this.lowerImageTop.screenOffsetX = this.viewerDim + papaya.viewer.Viewer.GAP, 
            this.lowerImageTop.screenTransform[1][2] += this.lowerImageTop.screenOffsetY = 0
            
            
            ));

Can anyone guide me how to reassign the layout.
Please suggest me how to proceed.

@neurolabusc
Copy link
Contributor

@amir201808 you may want to try out NiiVue which uses the libraries developed by the Papaya team but uses WebGL 2 for display. In the multi-planar view all views have the same spatial resolution. It will automatically switch between showing the three slices as one row or two depending on the canvas aspect ratio.

@cynde
Copy link

cynde commented Mar 7, 2023

@amir201808 can you give me the full code of calculateScreenSliceTransforms() that you have been modified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants