<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>I am trying to modify the SmartVolumeMapper example to read an .xdmf file, but I get an error when calling the Update() function.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-indent:.5in'>1 1'Value' not in itemProperties in XdmfTime::populateItem<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The error above is all I have been able to get out of the function. What am I doing wrong? The .xdmf, .h5 and .hdf5 are all in the same folder and the “1 1” output before the error shows that it can be read. I am using VisualStudio 2015 and no other libraries than VTK. I am building everything as x64 Release. The error occurs between ‘1’ and ‘2’. (Please refer to the printf() calls below.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This is a minimal program that causes the error:<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkVersion.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkSmartPointer.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkSphere.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkSampleFunction.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkSmartVolumeMapper.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkColorTransferFunction.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkPiecewiseFunction.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkRenderer.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkRenderWindow.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkRenderWindowInteractor.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkVolumeProperty.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkCamera.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkImageShiftScale.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkImageData.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkPointData.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkDataArray.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkXMLImageDataReader.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:gray'>#include</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'><vtkXdmf3Reader.h></span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue'>static</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> CreateImageData(</span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>vtkImageData</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>* </span><span style='font-size:9.5pt;font-family:Consolas;color:gray'>im</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> main(</span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:gray'>argc</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>, </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>char</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> *</span><span style='font-size:9.5pt;font-family:Consolas;color:gray'>argv</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>[])<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>vtkSmartPointer</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><</span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>vtkXdmf3Reader</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>> reader =<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>vtkSmartPointer</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><</span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>vtkXdmf3Reader</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>>::New();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>SetFileName(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> printf(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"1 %d"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> , reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>CanReadFile(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>));<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>Update();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> printf(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"2"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> numArrays = reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>GetNumberOfPointArrays();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> printf(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"3"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>for</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> (</span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> i = 0; i < numArrays; i++) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> printf(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"Name of index %d is: %s"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>, i, reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>GetPointArrayName(i));<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> printf(</span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"2"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>return</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> 0;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'>Finally, I noticed that the standard way of copying the read data to the vtkImageData is by doing a shallow copy of the output of the reader, but </span><span style='font-size:9.5pt;font-family:Consolas'>imageData->ShallowCopy(reader->GetOutput()) does not compile as GetOutput() does not exist. I have a feeling this might have something to do with the fact that this is a 4D file and not a standard 3D file. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'>If possible a working example would be great to have.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'>Finally, some functions like Update() and Read() are not listed in the documentation: <a href="http://www.vtk.org/doc/nightly/html/classvtkXdmf3Reader.html">http://www.vtk.org/doc/nightly/html/classvtkXdmf3Reader.html</a> Just a heads up.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'>Thank you so much for your help.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'>Yours,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'>Magnus Elden<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>