lass="sc">\n</span><span class="st">&quot;</span>)</span>
<span id="cb4-9"><a href="#cb4-9" tabindex="-1"></a><span class="co">#&gt; Cuboid ROI contains 343 voxels</span></span>
<span id="cb4-10"><a href="#cb4-10" tabindex="-1"></a></span>
<span id="cb4-11"><a href="#cb4-11" tabindex="-1"></a><span class="co"># Extract values from the original image using ROI</span></span>
<span id="cb4-12"><a href="#cb4-12" tabindex="-1"></a>roi_values <span class="ot">&lt;-</span> img[<span class="fu">coords</span>(sphere