Dear Daphné, looks like this VTK-issue: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines . We fixed this on Friday, October 28. 2016: https://phabricator.mitk.org/T20070 , git-commit 10bf4f18a76ba41a3079745b58a236523be6885e :
// add this to your mapper's header file to get rid of that nasty, unexpected nullptr: #include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingVolumeOpenGL); // or add: find_package(VTK) // and: include(${VTK_USE_FILE}) // to the corresponding CMakeLists.txt . Alternatively you could try using the GPU volume renderer by setting volumerendering.usegpu to true. Hope that helps, Mit freundlichen Grüßen / Kind regards, ________________________________________ Martin Hettich DKFZ-Juniorgruppe Medizinische Bildverarbeitung Student Deutsches Krebsforschungszentrum Stiftung des öffentlichen Rechts Im Neuenheimer Feld 280 69120 Heidelberg Tel: +49 6221 42-3546 Fax: +49 6221 42-2345 m.hett...@dkfz.de www.dkfz.de/de/medizinische-bildverarbeitung Vorstand: Prof. Dr. Michael Boutros (komm.), Prof. Dr. Josef Puchta USt-ID: DE143293537 ________________________________________ Martin Hettich DKFZ Junior Group Medical Image Computing Student German Cancer Research Center (DKFZ) Foundation under Public Law Im Neuenheimer Feld 280 69120 Heidelberg Germany phone: +49 6221 42-3546 fax: +49 6221 42-2345 m.hett...@dkfz.de http://www.dkfz.de/en/medizinische-bildverarbeitung Management Board: Prof. Dr. Michael Boutros (interim), Prof. Dr. Josef Puchta VAT-ID No.: DE143293537 ________________________________________ ________________________________________ Von: Daphné Wallach [daphne.wall...@hrv-simulation.com] Gesendet: Mittwoch, 9. November 2016 10:38 An: mitk-users@lists.sourceforge.net Betreff: [mitk-users] Volume rendering Dear Mitk users, I am working on an application using Mitk as a library. For technical reasons, I had to use an existing framework and could not develop an Mitk module or plug-in. The aim of the application is to load a DICOM image and segment it. I am facing an issue with volume rendering: I would like the segmentation volume to be visible in 3D, and updated in real time (similarly to what exists in the workbench). Looking into the MITK code, I thought I could simply create a mapper and assign it to my data node, but this crashes the code with the following message: "Exception caught: reading access violation. this->ImageDisplayHelper was nullptr." The offending line is in the file vtkFixedPointVolumeRayCastMapper.cxx, l717: "this->ImageDisplayHelper->PreMultipliedColorsOn();". Below is a snippet of my code: // Created a node called totalDataNode, added it to the datastorage mitk::Mapper::Pointer totalMapper; totalMapper = mitk::GPUVolumeMapper3D::New(); totalMapper->SetDefaultProperties(totalDataNode); totalMapper->SetDataNode(totalDataNode); totalDataNode->SetMapper(2, totalMapper); totalDataNode->SetProperty("volumerendering", mitk::BoolProperty::New(true)); totalDataNode->SetProperty("volumerendering.uselod", mitk::BoolProperty::New(true)); totalDataNode->SetProperty("volumerendering.usegpu", mitk::BoolProperty::New(false)); totalDataNode->SetProperty("volumerendering.useray", mitk::BoolProperty::New(false)); totalDataNode->SetProperty("volumerendering.usemip", mitk::BoolProperty::New(false)); The line totalDataNode->SetProperty("volumerendering", mitk::BoolProperty::New(true)); triggers the error. Does anybody know of the correct way to create and use a mapper? I would greatly appreciate any help. Thanks in advance! Daphné ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users