Hi Stefan,

It turns out that MITK always, regardless of the selected file ending, picks 
the mitk::UnstructuredGridVtkWriter<vtkXMLPUnstructuredGridWriter> to save 
unstructured grids. In practice this means it writes a composition vtu (usually 
.pvtu) with the wrong file ending (whichever the user selected). 

The file reader on the other hand seems to trust the fileending and thus fails 
to notice that the .vtu being loaded is actually a .pvtu and simply doesn’t 
load the referenced sub pieces. But i didn’t really look into this as i didn’t 
need the ability to read pvtu.

For my current use case i just disabled the vtkXMLPUnstructuredGridWriter in 
mitkIOExtObjectFactory.cpp as i don’t need the support for it.

Cheers,
Thomas

> On 19.01.2016, at 15:33, Kislinskiy, Stefan <s.kislins...@dkfz-heidelberg.de> 
> wrote:
> 
> Hi Thomas,
> 
> sorry for the late reply, your mail slipped through our fingers. Did you 
> solve this problem meanwhile?
> 
> Best regards,
> Stefan
> 
> -----Original Message-----
> From: Fitze Thomas (fitz) [mailto:f...@zhaw.ch] 
> Sent: Montag, 14. Dezember 2015 10:18
> To: Mitk-users
> Subject: [mitk-users] unstructured grid file IO
> 
> Hey all,
> 
> I got some problems working with .vtu / .pvtu files in MITK. When i save a 1 
> piece (no time steps) unstructured grid in the workbench to either a .vtu or 
> .pvtu, it will create 2 files: 
> - The actual piece as unstructuredGrid_0.vtu 
> - and a composition of pieces as unstructuredGrid.vtu which is basically an 
> empty header with a reference to unstructuredGrid_0.vtu. 
> However, when trying to load the composition with the workbench, it seems to 
> ignore the referenced piece and will only load the empty header. Other 
> applications (e.g. Paraview) load the files correctly.
> 
> I had a look at the mitkUnstructuredGridVtkWriter, but i can’t figure out why 
> this is happening. I tried to reproduce the behavior in a standalone VTK 
> application using the code in mitkUnstructuredGridVtkWriter.txx, but i always 
> get the expected result of just 1 file.
> 
> Preferably i’d like to have the output in 1 file only which is afaik how VTK 
> handles this by default. 
> 
> Any ideas?
> 
> Thomas
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to