[vtkusers] Update 4.4 to 5.0 problem!

John Biddiscombe biddisco at cscs.ch
Fri Jul 14 06:37:13 EDT 2006


Ingo,

The problem lies in the Texture generator being a subclass of
vtkStructuredPointsSource - which is really supposed to be obsolete. It
has a flaw - in the old days, structured points were generated slightly
differently from imagedata because the Extents were handled differently
- in short, it calls input->Update() during the executeInformation phase
- this is so that when an output is generated, it can put something
sensible in the extents. However, this is what causes the trouble in
your case. The filter gets an update and internally calls update again -
  the way the new pipeline handles this is by giving you the error you
found.

Note that you are allowed to call update on an input by hand, but you
have to be careful about when you do it.

I've changed the class to be a subclass of vtkImageAlgorithm and 
replaced the relevant pieces of RequestInformation and RequestData so 
that they do the correct thing.

I've not tested it very well, but your demo runs. NB. I removed the tif 
file write by commenting it out because it looked like it was there for 
debug purposes.

Note 1 : In the request information, I've just stuck whatver texture 
extents are available - strictly speaking we should ensure that the 
lookuptable is uptodate, but I think this is already done. What this 
means is that the information returned to the next filter could be 
wroing - however this doesn't actually matter becas eth the next filter 
is a texture and it isn't checking the information anyway.

Note 2 : When you run this demo you'll get a warning message because 
I've found a bug/feature with vtkTexture, which is that it doesn't 
override vtkImageAlgorithm::Execute() which by default says "Put some 
code in here to generate the data"
In fact this is not necessary for vtkTexture and I'll fix it (it doesn't 
output anything anyway, just produces a texture)

In the meantime,

add to protected part of vtkTexture.h
   // Override vtkImageAlgorithm warning message
   virtual void ExecuteData(vtkDataObject *);
and cpp
//----------------------------------------------------------------------------
// We must overrride this to avoid vtkImageAlgorithm producing a warning
void vtkTexture::ExecuteData(vtkDataObject *)
{
   return;
}
//----------------------------------------------------------------------------

enjoy

JB
NB. I'm in the process of finalizing a vtkContrib repository which this 
class could be contributed to if you want.


> Hi,
> 
> here comes a complete sample. (originally from David)
> Anyone how can help translate this to 5.0/CVS code ?
> 
> greets
>   Ingo
> 
> 
>> -----Original Message-----
>> Subject: [vtkusers] Update 4.4 to 5.0 problem!
>>
>>
>> Hi,
>>
>> I have a problem with a class written by David Pont to solve
>> a problem concering the LookUpTable color interpolation.
>>
>> Now, I have updated VTK from 4.4 to 5.0.1 an have some 
>> trouble with it. I get the following error:
>>
>> ERROR: In .\vtkExecutive.cxx, line 783 
>> vtkStreamingDemandDrivenPipeline (01D6CBA8): UpdateData 
>> invoked during another request. Returning failure to 
>> algorithm vtkLookupTableToTexture(01D6C4A0).
>>
>> Any hints on this ?
>> I guess I have to modify the class itself to make it work 
>> again, but I haven't a clue where to start. There is nothing 
>> in the wiki how to upgrade classes form 4.4 to 5.0. The 
>> webside search didn't bring any clues either.
>>
>> greets
>>   Ingo
>>
>> ---
>> Dr.-Ing. Ingo H. de Boer
>>
>> Polytec GmbH
>> Polytec-Platz 1-7, 76337 Waldbronn, Germany
>> phone: ++49 7243 604 106
>> fax  : ++49 7243 604 255
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list. 
>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers


-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82

-------------- next part --------------
A non-text attachment was scrubbed...
Name: texturemap.zip
Type: application/x-zip-compressed
Size: 23662 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060714/1610e99b/attachment.bin>


More information about the vtkusers mailing list