<p>This is exactly what I wanted. I&#39;ll try and implement this and let you know how it goes.</p>
<p><blockquote type="cite">On Jan 28, 2011 7:11 PM, &quot;David Gobbi&quot; &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt; wrote:<br><br><p><font color="#500050">On Fri, Jan 28, 2011 at 7:45 PM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt; wrote:</font></p>
<div class="gmail_quote"><p><font color="#500050">&gt;<br>&gt; I have a binary vtkImageData that a user can modify through some tools I provide them.  However,...</font></p><div>No, but it shouldn&#39;t be too hard to do this.  You can get a pointer to the data by calling GetScalarPointer() on the image data.  The size of this data (in bytes) will be product of the Dimensions, the NumberOfScalarComponents, and the ScalarSize.</div>


<div><br></div><div>So, you should easily be able to compute a bytewise difference between two images.  There&#39;s no reason to write a new filter for this, since it&#39;s just a simple for() loop.  Then, you can use vtkDataCompressor::Compress() to compress the diff so that it can be efficiently stored.  By doing everything bytewise, you don&#39;t have to worry about different datatypes, and you shouldn&#39;t lose anything in terms of efficiency.</div>


<div><br></div><div>If the image changes in size, then you could store a compressed copy of the full image rather than dealing with the difficulty of diffing images of different sizes.</div><div><br></div><div>I hope this helps.</div>


<div><br></div><div>  - David</div><div><br></div></div>
</blockquote></p>