[vtk-developers] clean-up of 'imaging'
David Gobbi
dgobbi at irus.rri.on.ca
Tue Jan 30 13:42:55 EST 2001
Hi All,
Regarding the upcoming vtk4, there are three items of particular
interest to me:
1) cleanup of the VTK imaging classes
2) simplification of vtkProp3D & vtkCamera interfaces
3) the python wrappers
This message will focus on the imaging classes. Points are listed
below
1) Documentation, documentation, documentation! Many of the classes
don't have enough of it.
2) One particular concern of mine is that many filters, when they
convert floats to ints, peform truncation rather than rounding.
This would be straightforward (though time-consuming) to fix,
and would make VTK much more suitable for quantitative image
analysis.
3) vtkImageMathematics _should_ be one of the most important
imaging classes, but it suffers from inflexibility and
severe inefficiency, plus an almost complete lack of
documentation. Here is my proposal:
Probably the most commonly used operation in image analysis
is to compute the linear combination of a set of images:
y = c + k1*f(x1) + k2*f(x2) + ...
Right now, there is no easy or efficient way to perform this
operation in VTK! Some of the MRI scientists in my lab consider
this to be a bread-and-butter operation, something that should
be present in even the most basic image proccessing toolkits.
vtkImageMathematics should have the following methods:
SetConstantC(double) -- set c, default 0.0
SetConstantK(double, int) -- set k1 through kn, default 1.0
SetUnaryOperation(int) -- set the 'f()' function, default identity
SetBinaryOperation(int) -- set the binary op, default '+'
E.g. if the binary option was Divide then the operation would be:
y = c + k1*f(x1) / k2*f(x2) / ...
The existing 'SetOperation' interface would be gradually deprecated
in favor of 'SetUnaryOperation' and 'SetBinaryOperation'.
4) In medical imaging (and many other fields), even though the
images are stored as 'ints' the integer values represent some
real quantity, i.e. v = shift + scale*i where 'v' is some
physical quantity and 'i' is the integer value.
Either vtkImageData or even vtkScalars should have 'Shift' and
'Scale' ivars to allow conversion from the integer values to
the desired values. These ivars should be honored by
vtkImageMathematics and the other VTK filters (this would entail
a lot of work).
Well, that's all for now. I've placed these in order of priority
(according to my humble opinions). Any feedback would be
appreciated.
- David
--
David Gobbi, MSc dgobbi at irus.rri.on.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
More information about the vtk-developers
mailing list