Page MenuHomePhabricator

porting FiberBundleMapper2D to masterbranch
Closed, ResolvedPublic

Assigned To
None
Authored By
reicht
Sep 14 2011, 5:24 PM
Referenced Files
F730: aSmallFIbs.fib
Sep 15 2011, 9:19 PM
F729: aSmallFIbs.fib
Sep 15 2011, 9:18 PM
Subscribers

Related Objects

StatusAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

for some reason the 2D FiberBundleMapper can not be called by the mitkVtkPropRenderer. when calling datatreenode->GetMapper(1), the returning value is NULL. in bug-branch 8824 it is still working.

A closer look to this issue:

  1. in mitkDiffusionImagingObjectFactory, FBMapper2D is initialized and according datanode is set.
  2. In addition to that, the mapper is set to the node explecitely.

mitk rendering mechansims:

  1. mitkVtkPropRenderer calls node->GetMapper(id_for_2DMapper)
  2. mitkDataNode::GetMapper(id) reaches mapper by calling following code: m_Mappers[id] = CoreObjectFactory::GetInstance()->CreateMapper(const_cast<DataNode*>(this),id);

but during calling this method, the FiberBundleMapper2D object gets destroyed by itkSmartPointer.

The calling stack:

  1. vtkPropRenderer::Render()
  2. vtkPropRenderer::PrepareMapperQueue()
  3. vtkPropRenderer::Update()
  4. vtkPropRenderer::Update(dataNode)
  5. mitk::DataNode::GetMapper(id)
  6. itk::SmartPointer<mitk::Mapper>::UnRegister()
  7. mitkFiberBundleMapper2D::Destructor()

The FiberBundleMapper2D Class is implemented according to the mitkImageVtkMapper2D. This issue could be caused by some sideffects of other services inside MITK depending on certain gcc versions.

update: Just ported the fully working mitkImageVtkMapper2D into diffusionimaging module. renamed it to mitkImageVtkMapper2D2. even this one behaves the same like FiberBundleMapper2D!

well well well.... when porting mitkFiberBundleMapper2D into the CORE, then it works totally fine.

fiberbundle for testing 2D/3D Fibermappers

if downloading fiber bundle test data, crop .txt of filename. valid filename: aSmallFIbs.fib