[vtkusers] The vtkMINCImageReader - second iteration
David Gobbi
dgobbi at atamai.com
Mon Sep 4 21:21:18 EDT 2006
Hi All,
I've committed some significant enhancements for VTK minc support. The
biggest enhancement is a vtkMINCImageWriter for writing minc files from VTK.
There is also a class called "vtkMINCImageAttributes" that stores all
the attributes of the MINC file. By using this class, you can easily
pass all of the attributes from the reader to the writer so that patient
information, dimension order, and other important information is
preserved. The writer has a SetHistoryAddition() method for adding to
the history attribute of the minc file.
Here is a short summary of what these classes do, and what they don't
do. First the good stuff:
1) The reader automatically reorders the data into VTK x,y,z order.
2) The reader optionally converts real-valued integer data to floating
point (use RescaleRealValuesOn() )
3) The reader can handle 4D data: use SetTimeStep() to choose which time
frame to read.
4) The reader supports data caching, i.e. it only reads and stores the
specified UpdateExtent into memory.
5) All minc attributes can accessed via the vtkMINCImageAttributes class
6) The writer can write data in arbitrary dimension order (set dimension
order in vtkMINCImageAttributes)
7) The writer will update the pipeline slice-by-slice, making it
possible to process data without loading the entire data volume into
memory at once.
8) The writer can validate the file attributes before they are written
to ensure that they meet the minc standard
And the bad:
1) Only minc 1.0 files are supported, not hdf5-based minc 2.0 files
2) Irregular dimension spacing is not supported. I might add support
for irregular time spacing.
3) Dimension widths are not supported (does anyone actually use these?)
4) The reader does not do ICV-like data type conversion or dimension
reordering.
This is the last big chunk of work that I will be doing on these classes
for a while. The only future enhancement that I have planned is
incorporating VTK's new time handling into the reader and writer. This
would allow VTK pipelines to automatically carry 4D data from the
reader to the writer by processing each time step of the file in turn.
It would also, I suppose, allow MINC files to be used as 4D data sets in
ParaView.
Any comments are welcome.
- David
More information about the vtkusers
mailing list