Doina,

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.

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:

LINES 4 13
2 0 1
3 1 2 3
2 3 4
2 4 5

-Ken


From: ParaView <paraview-boun...@paraview.org> on behalf of "Doina Gumeniuc 
(224252 MAHS)" <224...@via.dk>
Date: Monday, November 13, 2017 at 12:55 PM
To: Mathieu Westphal <mathieu.westp...@kitware.com>, "paraview@paraview.org" 
<paraview@paraview.org>
Subject: [EXTERNAL] Re: [Paraview] NaN values


Hi Mathieu,

Sadly I can not import the whole file, but here is an example:



LINES 4 13

2 0 1 NaN

3 1 2 3

2 3 4 NaN

2 4 5 NaN



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.



I hope it explains what I mean. Thank you!

________________________________
From: Mathieu Westphal <mathieu.westp...@kitware.com>
Sent: November 13, 2017 4:29:18 PM
To: Doina Gumeniuc (224252 MAHS)
Cc: paraview@paraview.org
Subject: Re: [Paraview] NaN values

Hi
Can you share your dataset ?
Thanks,

Mathieu Westphal

On Mon, Nov 13, 2017 at 4:10 PM, Doina Gumeniuc (224252 MAHS) 
<224...@via.dk<mailto:224...@via.dk>> wrote:

Hi Mathieu,



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.

________________________________
From: Mathieu Westphal 
<mathieu.westp...@kitware.com<mailto:mathieu.westp...@kitware.com>>
Sent: November 13, 2017 2:53:19 PM
To: Doina Gumeniuc (224252 MAHS)
Cc: paraview@paraview.org<mailto:paraview@paraview.org>
Subject: Re: [Paraview] NaN values

Hi

ParaView understand NaN correctly as blanks.
If you are reading a .csv file, the correct string that is interpreted as NaN 
is "nan" without the quotes.
Best,

Mathieu Westphal

On Mon, Nov 13, 2017 at 2:48 PM, Doina Gumeniuc (224252 MAHS) 
<224...@via.dk<mailto:224...@via.dk>> wrote:

Hi all,



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.

Is there any way I can replace this NaNs with something which paraview reads as 
blanks?

Thank you!

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to