[Insight-users] sparse images?

Dan Mueller dan.muel at gmail.com
Thu Nov 5 04:24:55 EST 2009


Hi Darren,

Reading your email again, perhaps I jumped the gun a bit by suggesting
the sparse image. The sparse image is designed for images which have a
few relevant pixels, but the rest background (ie. you don't set all
the pixels, just a few here and there).

If you need to process an entire image, then I think ITK's read/write
streaming feature will better suit your needs (assuming you can break
your processing into chunks).
    http://www.cmake.org/pipermail/insight-users/2002-May/000472.html
    http://www.itk.org/Doxygen/html/StreamingPage.html
    http://www.itk.org/Doxygen/html/group__StreamingGroup.html
    http://www.insight-journal.org/browse/publication/305

Please provide an exact overview of what you are trying to achieve, so
we can help determine the best approach.

Cheers, Dan

2009/11/5 Darren Weber <darren.weber.lists at gmail.com>:
>
> Hi Dan,
>
> The proposal is very interesting.  Having read the PDF, I'll take a look at
> the code.  I may be able to offer a review (time permitting).
>
> Do you have any recent examples of using either the SliceContiguous or the
> Sparse images to compose a 3D volume from a series of 2D image files?  Do
> you somehow
>
> a) Allocate the custom image memory (if known size & pixtype)
> b) Create an IO object to read data from an image file
> c) manually iterate over the IO object data with Get/Set accessors to put
> data into custom image memory
> d) Filter, etc. (if possible)
> e) Write out image data to disk (somehow)
>
> I can take the performance hit for the sparse image with Setting values.
>
> Should I be looking into streaming data models?  Essentially all I need to
> do is stream a set of 2D input data straight out to a 3D output data file.
> I'm currently using a series reader (with a regex to define the image
> series) and piping it straight to a writer (with vtkIO for the writer).  If
> a streaming model is available for this data transfer, it might avoid the
> segfaults due to allocation limits (I have plenty of disk space, just not
> enough RAM).
>
> Thanks!
> Darren
>
>
>
>
>
> On Wed, Nov 4, 2009 at 1:54 PM, Dan Mueller <dan.muel at gmail.com> wrote:
>>
>> Hi Darren,
>>
>> You might want to investigate the following Insight Journal submission:
>>    http://www.insight-journal.org/browse/publication/646
>>
>> <shameless plug>
>> Make sure you leave a review!
>> </shameless plug>
>>
>> Cheers, Dan
>>
>> 2009/11/4 Darren Weber <darren.weber.lists at gmail.com>:
>> >
>> > I'm working with a very large dataset (1000's of 2D images, size >
>> > 1024x1024
>> > pixels, ushort RGB pixels).  A large portion of these images is
>> > background.
>> >
>> > A few routines, like saving all the 2D images into a 3D volume, fail
>> > with
>> > segfaults due to malloc errors (on OSX 10.5.8 with 24Gb RAM; using ITK
>> > 3.16.0).
>> >
>> > Is there an image format that provides 'sparse' images?  This implies
>> > there
>> > are no data values for some of the image pixels (is this the same thing
>> > as
>> > transparent background?).
>> >
>> > What is an optimal image format for working with this data?
>> >
>> > Thanks in advance (TIA),
>> > Darren


More information about the Insight-users mailing list