# How to calculate XYToSlice

**URL:** <https://discourse.slicer.org/t/how-to-calculate-xytoslice/40830>\
**Category:** Development\
**Created:** [December 23, 2024, 4:18am UTC](https://discourse.slicer.org/t/how-to-calculate-xytoslice/40830 "2024-12-23T04:18:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigBrotherHui](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bigbrotherhui/32/13630_2.png) [@BigBrotherHui](https://discourse.slicer.org/u/BigBrotherHui)\
**Post date:** [December 23, 2024, 4:18am UTC](https://discourse.slicer.org/t/how-to-calculate-xytoslice/40830/1 "2024-12-23T04:18:19Z")

</div>

hello,i want to know what XYToSlice matrix depends on? the renderer size,image spacing,image dimensions,image origin? anything else? i have seen the 3d slice’s source code ,but i’m confused about fieldofview ,why it init to 250,250,0？and how to recalculate it when the renderer size changed?thank you
