[vtkusers] QVTKWidget + volume misbehavior

Dominik Szczerba dominik at itis.ethz.ch
Thu Nov 13 02:51:57 EST 2008


That is exactly what I had thought: no, the image is a DeepCopy of a 
readers output, so it is not a part of a pipeline. However, updating the 
pipeline with new spacing "solves" the problem (see my other email). I 
am wondering if it is not a bug by some chance.

Thanks for feedback.

Dominik

clinton at elemtech.com wrote:
> Does image point to the output of another filter?  In which case the execution 
> of the pipeline will overwrite anything you do to image.  Maybe you intend to 
> delete the filter and keep the image?
> 
> Clint
> 
> On Wednesday 12 November 2008 4:42:23 am Dominik Szczerba wrote:
>> I am doing something as trivial as:
>>
>> 	// record existing spacing
>> 	image->GetSpacing(old_spacing);
>>
>> 	// modify it
>> 	image->SetSpacing(new_spacing);
>> 	image->Modified();
>>
>> 	// refresh display
>> 	vtkWidget->GetRenderWindow()->Render();
>>
>> 	// debug
>> 	image->GetSpacing(current_spacing);
>>
>>
>> which behaves correctly, with current_spacing = new_spacing and my
>> outline actor responding to the changes.
>>
>> The moment I call:
>>
>> 	ren1->AddVolume(volume); // volume is representation of image
>>
>> I can properly see my volume only before calling Render():
>> current_spacing gets reset back to old_spacing right after.
>>
>> 1) Am I doing something obviously wrong (like I am not allowed to modify
>> a registered volume)
>> 2) What is caching the original image properties and why?
>>
>> Thanks for any hints,
>> Dominik
> 
> 

-- 
Dominik Szczerba, PhD
Computational Physics Group
IT'IS Foundation
http://www.itis.ethz.ch



More information about the vtkusers mailing list