ass="section level2">
<h2 id="reading-in-an-image">Reading in an image<a class="anchor" aria-label="anchor" href="#reading-in-an-image"></a>
</h2>
<p>Here we will use the <code>readnii</code> function to read in the image to an object called <code>img</code>:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">ne