<p>We could also provide some functionality to convert from a cube representation of an image to a flattened matrix.  It's a lot easier in the internal code to support only one type of object, especially because in this case the slices and columns would have to be handled differently.</p>

<p>I suppose we could add something like <code>data::FlattenCube(const arma::Cube&lt;eT&gt;&amp; cube, arma::mat&amp; matrix);</code>, but honestly I'm not sure that many people are loading their images as cubes (does Armadillo have built-in support for that?  I know <code>data::Load()</code> won't do it).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/523#issuecomment-196530974">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMl1VhWQGvP-5ZGYRCMlvDskktE5ks5ptdSjgaJpZM4HhWF3.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/523#issuecomment-196530974"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>