[Insight-developers] Repeated ImageIO::Read calls, without ReadImageInformation?

Mark Hiner hiner at wisc.edu
Tue Jul 9 10:22:32 EDT 2013


Hello all,

 I'm trying to modify the SCIFIO-ITK ImageIO to accommodate multi-series
datasets. I added API to the ImageIO itself allowing for series
specification, but am not sure how to get repeated ImageIO::Read calls
without also triggering ReadImageInformation (which I want to avoid, as it
is an expensive operation and only needs to execute once).

I have the following pipeline:

 itk::ImageFileReader -> itk::StreamingImagefilter -> itk::ImageFileWriter

and in a loop over the image series, I call my SCIFIOImageIO::SetSeries
method, and then ImageFileWriter::Update() to write the current series.

 But it seems like after being called once, Update() stops triggering
future ImageIO::Read calls as long as the same ImageIO is attached to the
ImageFileReader...

 So what's the intended ITK way of updating the ImageFileReader's output,
without re-parsing? I looked through the API docs, but nothing I've tried
has worked... (ImageFileReader::GenerateOutputInformation calls
ImageIO::ReadImageInformation. I'm assuming ImageFileReader::GenerateData
would do what I want, but it's protected so I suspect there's a different
way..)

Thanks!
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130709/f1fec0e9/attachment.htm>


More information about the Insight-developers mailing list