[vtkusers] vtkViewImage2D compatible with vtkKWEPaintbrush?

Xiaopeng Yang yxp233 at postech.ac.kr
Tue Feb 7 09:56:05 EST 2012


Dear Users,

 

Previously I used vtkImageViewer2 and vtkKWPaintbrush to show an original CT
image overlapped with a mask image to edit the mask image. It worked
perfectly. 

However, when I change vtkImageViewer2 to vtkViewImage2D, the mask image
does not appear over the CT image.

I am wondering whether vtkViewImage2D is compatible with vtkKWEPaintbrush?

 

I checked the code and found that the difference comes from GetImageActor. 

                vtkKWEPaintbrushRepresentation2D * rep =

 
vtkKWEPaintbrushRepresentation2D::SafeDownCast(w->GetRepresentation());

                if (rep)

                {

                        rep->SetImageActor( imageView->GetImageActor() );

                        .

                }

If imageView is vtkImageViewer2, it works fine. If imageView is
vtkViewImage2D, the mask image does not appear at all.

 

Thank you very much for your help!

 

Best regards,

Xiaopeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120207/7cc77ea9/attachment.htm>


More information about the vtkusers mailing list