Dear Tal,
Your code looks fine on a quick sight. It may be easier to understand if you
show us more of the context of your application: What does your PointSet
(currentPointSet) contain (how many points)? How is the input image initialized?
What I'm missing from your code is a request to update the rendering system. If
you are not doing this already try:
m_MappingRenderer->GetDisplayGeometry()->Fit();
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
Regarding your second question, I'm not sure if I get it right: do you mean
calculating the geodesic distance between two points on the curved geometry the
filter calculates?
Best regards,
Mathias
Von: Tal Eisenberg [mailto:[email protected]]
Gesendet: Dienstag, 9. November 2010 15:38
An: [email protected]
Betreff: [mitk-users] Curved MPR
Hi all,
I am trying to display a Curved MPR .
1. I have a point set which was set on the axial image, and I have manged to
create the curve and the plane, however I cannot manged to display it on the
viewer as CMPR (Please refer the code bellow)
2. Can I determine the distance between the points on the curve (in order to
present Cross sectional images) ?
Any help would be appreciated
Thanks
Tal
---------------
m_PointSetToCurvedGeometryFilter = mitk::PointSetToCurvedGeometryFilter::New();
m_PointSetToCurvedGeometryFilter->SetInput
( currentPointSet );
m_PointSetToCurvedGeometryFilter->SetImageToBeMapped ( image );
m_PointSetToCurvedGeometryFilter->SetProjectionMode
(mitk::PointSetToCurvedGeometryFilter::XZPlane );
m_PointSetToCurvedGeometryFilter->Update();
mitk::GeometryData::Pointer geometryData =
m_PointSetToCurvedGeometryFilter->GetOutput();
// Create a node for the curved geometry
mitk::DataNode::Pointer node =
mitk::DataNode::New();
node->SetData ( geometryData );
mitk::PointSetToCurvedGeometryFilter::SetDefaultCurvedGeometryProperties (
node.GetPointer() );
// set image geometry and switch to 2D view
// get renderer
mitk::BaseRenderer::Pointer pMappingRenderer
=
mitk::BaseRenderer::GetInstance(m_MultiWidget->mitkWidget4->GetRenderWindow());
pMappingRenderer->SetWorldGeometry(geometryData->GetGeometry());
pMappingRenderer->SetMapperID(mitk::BaseRenderer::Standard2D);
mitk::Geometry2DDataVtkMapper3D::Pointer
mapper = mitk::Geometry2DDataVtkMapper3D::New();
mapper->SetDataStorageForTexture ( this->GetDataStorage());
node->SetMapper (
mitk::BaseRenderer::Standard3D, mapper );
this->GetDataStorage()->Add ( node ,
imageNode );
node->SetProperty ( "name",
mitk::StringProperty::New ("CMPR" ) );
node->SetColor ( 0.0f, 1.0f, 0.0f );
node->SetVisibility ( true );
node->SetVisibility( true,
m_MultiWidget->GetRenderWindow4()->GetRenderer() );
node->Modified();
node->GetData()->Modified();
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users