<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><div style="font-size: 12pt; border-color: rgb(204, 204, 204); ">It is possible to apply vtkAffineWidget on the contour generated by vtkContourWidget? I have tried, but my contour need to be an actor.</div><div style="font-size: 12pt; border-color: rgb(204, 204, 204); "><br></div><div style="font-size: 12pt; border-color: rgb(204, 204, 204); ">Basically, there is the code for creating the desired contour:</div><div style="font-size: 12pt; border-color: rgb(204, 204, 204); "><br></div><div style="border-color: rgb(204, 204, 204); "><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="color: rgb(91, 91, 91); ">vtkContourWidget *ContourWidget = vtkContourWidget::New();</span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91,
91); "><br></span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> vtkOrientedGlyphContourRepresentation *rep = vtkOrientedGlyphContourRepresentation::New(); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> rep->GetLinesProperty()->SetColor(1, 0, 0);</span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> ContourWidget->SetRepresentation(rep);</span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> vtkImageActorPointPlacer * imageActorPointPlacer =
vtkImageActorPointPlacer::New(); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> imageActorPointPlacer->SetImageActor(ImageViewer->GetImageActor()); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> rep->SetPointPlacer(imageActorPointPlacer); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "><br></span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> imageActorPointPlacer->Delete(); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> rep->Delete(); </span></div><div
style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "><br></span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> ContourWidget->SetInteractor(iren); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="font-size: small; color: rgb(91, 91, 91); "> ContourWidget->SetEnabled(true); </span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); "><span style="color: rgb(91, 91, 91); "> ContourWidget->ProcessEventsOn();</span></div><div style="font-size: 13px; border-color: rgb(204, 204, 204); color: rgb(91, 91, 91); font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span style="color: rgb(91, 91, 91); "><br></span></div><div style="border-color: rgb(204, 204, 204);
font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal; "><span>How can I use AffineWidget on it?</span></div><br class="Apple-interchange-newline"></div></span></div><div style="font-size: 12pt; "><br></div> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jothybasu Selvaraj <jothybasu@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Dora Szasz <dora.szasz@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" <vtkusers@vtk.org>; "insight-users@itk.org" <insight-users@itk.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 28, 2012 11:04 AM<br> <b><span
style="font-weight: bold;">Subject:</span></b> Re: [vtkusers] vtkContourWidget and vtkImageViewer2<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv553702953"><div dir="ltr">Have a look at vtkAffineWidget.<br><br>Jothy<br><br><div class="yiv553702953gmail_quote">On Mon, Aug 27, 2012 at 8:07 PM, Dora Szasz <span dir="ltr"><<a rel="nofollow" ymailto="mailto:dora.szasz@yahoo.com" target="_blank" href="mailto:dora.szasz@yahoo.com">dora.szasz@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv553702953gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div>Hi,</div><div><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;">
I still have the question about vtkContourWidget and vtkImageViewer2.</div><div style="font-style:normal;font-size:16px;background-color:transparent;">How can I rotate only the contour, without rotating the image? (for translation, if I select the contour and drag it with the Middle Mouse, I can do this). How can I make the rotation and scaling work in such a way?</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;">Thank you!</div><span class="yiv553702953HOEnZb"><font color="#888888"><div style="font-style:normal;font-size:16px;background-color:transparent;">
<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;">Dora Szasz</div></font></span></div></div><br>_______________________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com/">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.vtk.org/mailman/listinfo/vtkusers<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothybasu Selvaraj<br>PhD Student<br>University of Liverpool<br>UK<br></div><br>
</div>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div> </div></body></html>