<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi!</p>
<p>Yes, I of course understand your point. There is a bit of a problem though: In reality, this file is much more bigger and deleting the NaNs by hand is not an option (also I am trying to make it all happen automatically). If I ask matlab to delete the zeros
 from my file, the shape of the matrix will change, so the only solution I found so far is to replace the zeros by NaNs in matlab, which gives me error in paraview, for the reason you, Moreland, explained.</p>
<p>So my question would be again, is it possible to replace it with anything else?</p>
<p>Thank you!</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Moreland, Kenneth <kmorel@sandia.gov><br>
<b>Sent:</b> November 14, 2017 12:24:03 AM<br>
<b>To:</b> Doina Gumeniuc (224252 MAHS); Mathieu Westphal; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] NaN values</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:x_link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
p.x_MsoListParagraph, li.x_MsoListParagraph, div.x_MsoListParagraph
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.x_EmailStyle18
        {font-family:"Calibri",sans-serif;
        color:windowtext}
span.x_msoIns
        {text-decoration:underline;
        color:teal}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
ol
        {margin-bottom:0in}
ul
        {margin-bottom:0in}
-->
</style>
<div lang="EN-US" link="blue" vlink="purple" style="background-color:white">
<div class="x_WordSection1">
<p class="x_MsoNormal">Doina,</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">vtk files support Nan’s in general. (I just tried it. It worked fine.) However, you are trying to introduce NaN’s in a list of integer connections, which is just wrong on many levels. However, I do not see why you need NaN at all. The
 LINES connectivity list allows you to vary the length of the line chain.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">It looks like you can solve your problem by simply not writing out the NaN’s in the fill. In the example you sent us, I presume that you mean to have 4 line cells with 2, 3, 2, and 2 vertices, respectively. The following should be the
 correct representation of that:</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">LINES 4 13</p>
<p class="x_MsoNormal">2 0 1</p>
<p class="x_MsoNormal">3 1 2 3</p>
<p class="x_MsoNormal">2 3 4</p>
<p class="x_MsoNormal">2 4 5</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">-Ken</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt; color:black">From:
</span></b><span style="font-size:12.0pt; color:black">ParaView <paraview-bounces@paraview.org> on behalf of "Doina Gumeniuc (224252 MAHS)" <224252@via.dk><br>
<b>Date: </b>Monday, November 13, 2017 at 12:55 PM<br>
<b>To: </b>Mathieu Westphal <mathieu.westphal@kitware.com>, "paraview@paraview.org" <paraview@paraview.org><br>
<b>Subject: </b>[EXTERNAL] Re: [Paraview] NaN values</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
</div>
<div id="x_divtagdefaultwrapper">
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Hi Mathieu,</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Sadly I can not import the whole file, but here is an example:</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">LINES 4 13</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">2 0 1 NaN</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">3 1 2 3</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">2 3 4 NaN</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">2 4 5 NaN</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">I make the vtk file in matlab by extracting the information from a .dat file. Originally, instead of NaN there are zeros, but I just need blanks without changing the shape of the matrix,
 which is why I use NaN, but it gives me error in paraview.</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">I hope it explains what I mean. Thank you!</span></p>
</div>
<div class="x_MsoNormal" align="center" style="margin-left:.5in; text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal" style="margin-left:.5in"><b><span style="color:black">From:</span></b><span style="color:black"> Mathieu Westphal <mathieu.westphal@kitware.com><br>
<b>Sent:</b> November 13, 2017 4:29:18 PM<br>
<b>To:</b> Doina Gumeniuc (224252 MAHS)<br>
<b>Cc:</b> paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] NaN values</span> </p>
<div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="x_MsoNormal" style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in">
Hi</p>
</div>
<p class="x_MsoNormal" style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in">
Can you share your dataset ?</p>
</div>
<p class="x_MsoNormal" style="margin-left:.5in">Thanks,</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in"><br clear="all">
</p>
<div>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in">Mathieu Westphal</p>
</div>
</div>
</div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
<div>
<p class="x_MsoNormal" style="margin-left:.5in">On Mon, Nov 13, 2017 at 4:10 PM, Doina Gumeniuc (224252 MAHS) <<a href="mailto:224252@via.dk" target="_blank">224252@via.dk</a>> wrote:</p>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-right:0in">
<div>
<div id="x_x_m_-8731696095869304799divtagdefaultwrapper">
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Hi Mathieu,</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">I am using a vtk poly data file, which when I load in paraview, it gives me error (paraview just stops working). I was thinking it is because of my NaN values.</span></p>
</div>
<div class="x_MsoNormal" align="center" style="margin-left:.5in; text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="x_x_m_-8731696095869304799divRplyFwdMsg">
<p class="x_MsoNormal" style="margin-left:.5in"><b><span style="color:black">From:</span></b><span style="color:black"> Mathieu Westphal <<a href="mailto:mathieu.westphal@kitware.com" target="_blank">mathieu.westphal@kitware.com</a>><br>
<b>Sent:</b> November 13, 2017 2:53:19 PM<br>
<b>To:</b> Doina Gumeniuc (224252 MAHS)<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] NaN values</span> </p>
<div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in">Hi<br>
<br>
ParaView understand NaN correctly as blanks.</p>
</div>
<p class="x_MsoNormal" style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in">
If you are reading a .csv file, the correct string that is interpreted as NaN is "nan" without the quotes.</p>
</div>
<p class="x_MsoNormal" style="margin-left:.5in">Best,</p>
</div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in"><br clear="all">
</p>
<div>
<div>
<div>
<p class="x_MsoNormal" style="margin-left:.5in">Mathieu Westphal</p>
</div>
</div>
</div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
<div>
<p class="x_MsoNormal" style="margin-left:.5in">On Mon, Nov 13, 2017 at 2:48 PM, Doina Gumeniuc (224252 MAHS) <<a href="mailto:224252@via.dk" target="_blank">224252@via.dk</a>> wrote:</p>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-right:0in">
<div>
<div id="x_x_m_-8731696095869304799x_m_89463857156744834divtagdefaultwrapper">
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Hi all,</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black"> </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">I have a file with NaN values in almost every column and row. The integer numbers represent which points should be connected by lines, therefor I can not replace NaN with zeros because
 it will interpret it as Point with ID 0. </span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Is there any way I can replace this NaNs with something which paraview reads as blanks?</span></p>
<p style="margin-left:.5in"><span style="font-size:12.0pt; color:black">Thank you!</span></p>
</div>
</div>
<p class="x_MsoNormal" style="margin-right:0in; margin-bottom:12.0pt; margin-left:.5in">
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a></p>
</blockquote>
</div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="x_MsoNormal" style="margin-left:.5in"> </p>
</div>
</div>
</div>
</div>
</body>
</html>