<div class="gmail_quote">On Mon, May 31, 2010 at 6:20 PM, José Felipe Vargas Casadiego <span dir="ltr"><<a href="mailto:vargascasadiego@gmail.com">vargascasadiego@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I needed to read .mhd files and be able to take volumes of interest out of them. With vtkMetaImageReader I could read these files and with vtkImageReader I could obtain the volumes of interest (VOIs) at the expense of having to manually configure the reader. Hence I decided to combine the functionality of both in a new reader, 'till now simply called vtkMyMetaImageReader, inheriting from vtkImageReader2. With it it's possible to automatically read a .mhd file and then read subvolumes of it.<br>

<br>I'd like to know if it'd be possible to add this to vtk. I've checked the website and I wasn't able to find a proper procedure to do it. </blockquote><div><br>Jose:<br><br>Thanks.<br><br>If you are looking for an image based file format in VTK that already supports Streaming Input, please take a look at vtkXMLImageDataReader.<br>
 <br>The API is  <br>  vtiReader->GetOutput()->SetExtent( requestedExtent );<br>  vtiReader->Update();<br><br>----<br><br>Could you please send us the patch.<br><br>Have you added the functionality to the MetaIO (third party) library itself ?<br>
<br>It sounds from your email (please correct me if I'm wrong), that you've bypassed the Utilities/MetaIO library's read methods. Do you merely use them to read in the header and then read in the bulk data using your own file-seek methods. If so, it would be very hard for us to support that. The MetaImage library allows one to store the image in a variety of ways (as lists of 2D stacks, compressed with zlib, simple raw), and having the API work for only one case may not be possible.<br>
<br><br>Thanks<br>--<br>karthik</div></div><br>