Hi Horst,

you don't have to create a new surface. Rendering updates in MITK can be 
invoked via:

mitk::RenderingManager::GetInstance()->RequestUpdateAll();

All you have to do is to update the data which is held by the DataNode (or in 
your case the PolyData).

Regards
Andreas

On 24.01.2013, at 09:19, <[email protected]> wrote:

> Hi,
> 
> after modifying the data of a surface node, I looked for a possibility
> to update the mapper to render the manipulated data. When using pure VTK
> this is possible with the following statements:
> 
>       pMapper->Modified();
>       pMapper->Update();
> 
> But I can't find something similar in MITK. Isn't there really no
> mechanism to update the mapper of a node? Is it really necessary to
> create a new surface object like this?
> 
>       // get surface data
>       mitk::Surface* pSurface =
> dynamic_cast<mitk::Surface*>(pNode->GetData());
>       vtkPolyData* pData = pSurface->GetVtkPolyData();
>      vtkPoints* pPoints = pData->GetPoints();
> 
>       // manipulate data
> 
>       // create new surface to render manipulated data
>       mitk::Surface::Pointer pNewSurface = mitk::Surface::New();
>      pNewSurface->SetVtkPolyData(pData);
>      pNode->SetData(pNewSurface);
> 
> Thanks.
> Horst
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to