[vtkusers] Coordinates on image after rendered

masabumi ishihara maty.ishihara at gmail.com
Thu Oct 30 03:30:53 EDT 2008


Hi VTK users,

I'm now creating geometric elements, e.g. line or circle, on the 2D
images, which are on the viewports of renderers as follows;

			vtkLineSource *line = vtkLineSource::New();
			line->SetPoint1((double)x0,(double)y0,(double)0);
			line->SetPoint2((double)x1,(double)y1,(double)0);
			vtkPolyDataMapper *lineMapper = vtkPolyDataMapper::New();
			lineMapper->SetInput(line->GetOutput());
			vtkImage[nCurrent].pLineActor = vtkActor::New();
			vtkImage[nCurrent].pLineActor->SetMapper(lineMapper);
			vtkImage[nCurrent].pRenderer->SetViewport(xInit, yInit, xEnd, yEnd);
			vtkImage[nCurrent].pRenderer->AddActor(vtkImage[nCurrent].pLineActor);


But, I faced the very important problem, that the coordinates on the
image is so changeable by the renderer that the points of the
geometric elements may not be decided.
If you know any method to inform us of the coordinates after rendered,
please let me know!

Thanks,

Maty



More information about the vtkusers mailing list