[vtk-developers] VTK-Python: Numeric Array <-> ImageData.
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sun Dec 8 23:41:45 EST 2002
Hi David,
>>>>> "DG" == David Gobbi <dgobbi at imaging.robarts.ca> writes:
DG> Hi Prabhu, Thanks for the work. Here are some comments:
Thanks for the comments.
DG> 1) Since vtkConstants.py contains the same constants of
DG> vtkSystemIncluces.h, maybe the vtk/__init__.py should do a
DG> "from vtk.util.vtkConstants import *" so that people
DG> automatically have access to these constants (just like they
DG> do in C++)
Yes, I'll do this.
DG> 2) There are a whole bunch of missing calls to
DG> 'UpdateInformation' in vtkImageExportToArray (these were also
DG> missing in the original code) before calls to GetWholeExtent()
DG> etc.
I'm not too sure about where this goes. I have too little experience
with the imaging pipeline but I'll try and add them where I see fit
and let you comment.
DG> 3) Testing on multiple files doesn't make the test more
DG> rigorous, the important thing is to have one test per data
I thought as much.
DG> type (or at least the most common types: unsigned char, short,
DG> unsigned short, float) and a test for multiple components.
DG> At minimum the tests should include: 1 test on unsigned
DG> char greyscale, 1 test on short greyscale, 1 test on unsigned
DG> char color
Hmm, I plead ignorance. I can definitely learn a lot more about
imaging and then fix this but I think it would be nice if someone who
knows what to do takes a look. Will you have the time? If not maybe
point me in the right direction (even if its a Tcl example) and I'll
try.
[4]
DG> It would also be nifty if it checked for Numeric versions
DG> greater than 20 and did the direct array->void* trick that
DG> Berk mentioned instead of wasting memory by converting to a
DG> string first.
I'll look at this.
Hopefully in the next couple of days I'll be done with items 1, 2 and
4. 3 is up for grabs.
cheers,
prabhu
More information about the vtk-developers
mailing list