@@ -4,10 +4,8 @@ import { vec3 } from 'gl-matrix';
44import Vue from ' vue' ;
55import { mapState , mapGetters , mapMutations } from ' vuex' ;
66
7- import { cleanFrameName } from ' @/utils/helper' ;
87import CrosshairSet from ' ../utils/crosshairs' ;
98import fill2DView from ' ../utils/fill2DView' ;
10- import { getView } from ' ../vtk/viewManager' ;
119import { VIEW_ORIENTATIONS } from ' ../vtk/constants' ;
1210
1311export default {
@@ -40,7 +38,7 @@ export default {
4038 ' jIndexSlice' ,
4139 ' kIndexSlice' ,
4240 ]),
43- ... mapGetters ([' currentFrame' , ' currentScan' ]),
41+ ... mapGetters ([' currentFrame' , ' currentScan' , ' currentViewData ' ]),
4442 representation() {
4543 return (
4644 // force add dependency on currentFrame
@@ -236,14 +234,11 @@ export default {
236234 return trueAxis ;
237235 },
238236 async takeScreenshot() {
239- const view = getView (this .proxyManager , ` ScreenshotView2D_${this .name }:${this .name } ` , this .screenshotContainer );
240- view .getOpenglRenderWindow ().setSize (512 , 512 );
241- fill2DView (view , 512 , 512 );
242- const dataURL = await view .captureImage ();
237+ const dataURL = await this .view .captureImage ();
243238 this .setCurrentScreenshot ({
244- name: ` ${this .currentScan . experiment }/${
245- this .currentScan . name
246- }/${cleanFrameName ( this .currentFrame .name ) }/${this .displayName } ` ,
239+ name: ` ${this .currentViewData . experimentName }/${
240+ this .currentViewData . scanName
241+ }/${this .currentFrame .frame_number }/${this .displayName } ` ,
247242 dataURL ,
248243 });
249244 },
0 commit comments