On Wed, 2008-03-12 at 08:28 +0100, Xavi Planes wrote:
> Hi,
>
> I'm using MITK to display a skeleton (mitk::Surface) and an
> interactor to pick a point. The picking works when the user hits the
> skeleton but doesn't work when the user picks outside it.
>
> My problem is that I do not want the user to hit exactly the
> skeleton but allow for a tolerance region since the skeleton is very thin.
>
> Do you know how can I solve this?
Hi Xavi,
To do so, you should change the picking from WorldPicking (hardware,
z-buffer based) to PointPicking (software, intersections of triangles
and viewing rays), because the vtkPointPicker has a parameter
"tolerance". You could do so, e.g. in a functionality:
if ( mitk::VtkPropRenderer* renderer =
dynamic_cast<mitk::VtkPropRenderer*>(mitk::BaseRenderer::GetInstance(
m_MultiWidget->GetRenderWindow4()->GetRenderWindow() ) ) )
{
renderer->SetPickingMode( mitk::VtkPropRenderer::PointPicking );
}
To increase the picking tolerance you should call
vtkpointpicker->SetTolerance(...)
in MITK this could either be done centrally from
Core/Rendering/mitkVtkPropRenderer.cpp (constructor). The better
solution would be to include this parameter to the interface of
mitk::VtkPropRenderer. I'll bring this to discussion here.
If you instantiate your own vtkPointPicker, of course you can set any
parameters as you need them.
Best regards,
Daniel
--
Dipl.-Inform. Med. Daniel Maleike Phone: +49 6221 42 2326
Deutsches Krebsforschungszentrum Im Neuenheimer Feld 280
Medical and Biological Informatics (E130) 69120 Heidelberg
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users