# how to generate an array representing the projection of a multileaf collimator (MLC) field onto a CT slice in 3D Slicer?

**URL:** <https://discourse.slicer.org/t/how-to-generate-an-array-representing-the-projection-of-a-multileaf-collimator-mlc-field-onto-a-ct-slice-in-3d-slicer/33273>\
**Category:** Support\
**Tags:** python\
**Created:** [December 6, 2023, 11:27pm UTC](https://discourse.slicer.org/t/how-to-generate-an-array-representing-the-projection-of-a-multileaf-collimator-mlc-field-onto-a-ct-slice-in-3d-slicer/33273 "2023-12-06T23:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meryeme\_Bellahsaouia](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/meryeme_bellahsaouia/32/68594_2.png) [@Meryeme\_Bellahsaouia](https://discourse.slicer.org/u/Meryeme_Bellahsaouia)\
**Post date:** [December 6, 2023, 11:27pm UTC](https://discourse.slicer.org/t/how-to-generate-an-array-representing-the-projection-of-a-multileaf-collimator-mlc-field-onto-a-ct-slice-in-3d-slicer/33273/1 "2023-12-06T23:27:17Z")

</div>

I am trying to create an array with the same dimensions as a CT slice. Within this array, each voxel will have a value of 1 if it falls inside the MLC field and 0 if it falls outside.

Is this achievable using 3D Slicer?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 6, 2023, 11:33pm UTC](https://discourse.slicer.org/t/how-to-generate-an-array-representing-the-projection-of-a-multileaf-collimator-mlc-field-onto-a-ct-slice-in-3d-slicer/33273/2 "2023-12-06T23:33:57Z")

</div>

I think we are already beyond this. @Mik has implemented support for beams with MLC in SlicerRT extension. I would recommend you to check out SlicerRT extension and come back here with any questions that yo may have.
