[vtk-developers] Slice based memory representation of volume

David Gobbi dgobbi at atamai.com
Thu Nov 3 15:50:59 EST 2005


This caught my eye on the ITK list, apologies for anyone who gets 
duplicates.

The original post asked the question of whether ITK image data can be
non-contiguous (i.e. slice-by-slice).  It seems to me that in VTK we can
achieve something just as good as non-contiguous data via streaming.

I think that the only thing that we would need in VTK to support large
images is one VTK class that would act as a non-contiguous data cache.

We already have vtkImageDataStreamer, which is very close to what we
need.  The vtkImageDataStreamer accesses all upstream data in small,
manageable chunks.  If we had a streamer class that would also cache
the data in small chunks, then we would have everything we need.

Let's call this hypothetical class vtkImageNonContigousCache.  Here
is an example pipeline:

vtkImageReader2 -> vtkImageNonContiguousCache -> vtkImageViewer2

The "Cache" object would have a method called UpdateCache() which would
read the data chunk-by-chunk into its non-contiguous internal storage space.
When vtkImageViewer2 asks for an update, the "Cache" object would copy
the requested extent from its non-contigous storage space into its output.

Of course if anything downstream from the "Cache" object sets the update
extent to the whole extent, then the whole thing falls apart.  But as 
long as
downstream object only request single slices, everything is golden.

Has anyone tried something like this before?

 - David

Miller, James V (Research) wrote:

>Feng, 
>
>ITK does not currently support slice based memory representations. It is
>something that we have been considering.  We are trying to come up with 
>a design whereby the existing set of iterators would work.  If the
>iterators can handle this representation (in particular the neighborhood 
>iterators), then I expect most filters will work without issue.
>
>Jim
>
>-----Original Message-----
>From: insight-users-bounces+millerjv=crd.ge.com at itk.org
>[mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
>Feng Ma
>Sent: Thursday, November 03, 2005 2:57 PM
>To: insight-users at itk.org
>Subject: [Insight-users] slice based memory representation of itk volume
>
>
>Dear all:
>
>  I searched the mail-list and didn't find answer to this problem: do we 
>have slice-based memory allocation for itk volume? I think currently itk 
>volume data is in a single 1-D array.
>
>  The reason I ask this question is that on windows system, sometimes due to 
>memory fragment, it is not possible to allocate a large 1-D array for itk 
>volume, especially for large float volume. If the 3D volume memory is 
>allocated slice by slice, it will have much larger chance of success in 
>memory allocation. Certainly all filters have to be able to accommodate this 
>change.
>
>  Thanks.
>
>-Feng
>
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>  
>




More information about the vtk-developers mailing list