MantisBT - ParaView
View Issue Details
0010673ParaViewBugpublic2010-05-04 19:292010-07-07 10:02
Jon Woodring 
Robert Maynard 
normalmajoralways
closedfixed 
 
3.8.13.8.1 
0010673: CSV writer does not work with ghost cells and it writes char data as actual chars
GIT as of 2010-05-04.

If your data set has ghost cells, it will write out the ghost cells, rather than culling them. This wouldn't be a problem if the vtkGhostLevel was correct. Though, the written field is not correct, and in my experience it is all 0s.

I can verify this against a VTU writer with the same data. A VTU writer does the correct thing, by culling ghost cells on output.

Additionally, if your data has a char field, it writes the data out as chars, rather than int strings, so if there is a 0, there is a null character in the output.
No tags attached.
related to 0009869closed Robert Maynard Arrays of type char should be converted to ASCII numbers when written to CSV file 
Issue History
2010-05-04 19:29Jon WoodringNew Issue
2010-05-05 09:47Ken MorelandRelationship addedrelated to 0009869
2010-05-05 09:52Ken MorelandNote Added: 0020582
2010-05-05 12:10Jon WoodringNote Added: 0020588
2010-05-05 12:33Jon WoodringNote Added: 0020589
2010-05-05 13:11Jon WoodringNote Added: 0020590
2010-05-05 13:13Jon WoodringNote Edited: 0020590
2010-05-05 13:20Jon WoodringNote Added: 0020591
2010-05-05 13:52Ken MorelandNote Added: 0020593
2010-05-10 09:32Robert MaynardStatusbacklog => tabled
2010-05-10 09:32Robert MaynardAssigned To => Robert Maynard
2010-05-13 10:04Robert MaynardNote Added: 0020732
2010-05-13 10:21Robert MaynardNote Deleted: 0020732
2010-05-13 10:21Robert MaynardNote Added: 0020733
2010-05-13 10:21Robert MaynardStatustabled => @80@
2010-05-13 10:21Robert MaynardFixed in Version => 3.8.2
2010-05-13 10:21Robert MaynardResolutionopen => fixed
2010-05-17 21:26Alan ScottNote Added: 0020772
2010-05-17 21:26Alan ScottStatus@80@ => closed
2010-06-15 09:45Utkarsh AyachitFixed in Version3.8.2 => 3.8.1
2010-06-15 09:45Utkarsh AyachitTarget Version => 3.8.1
2010-07-07 09:55Utkarsh AyachitFixed in Version3.8.1 => Development
2010-07-07 10:02Utkarsh AyachitNote Added: 0021269
2010-07-07 10:02Utkarsh AyachitFixed in VersionDevelopment => 3.8.1

Notes
(0020582)
Ken Moreland   
2010-05-05 09:52   
The writing out char arrays to a CSV file issue should be fixed (see 0009869). Are you sure you have the most recent version?
(0020588)
Jon Woodring   
2010-05-05 12:10   
I cloned the git just yesterday, though I am new to git. Maybe I did something wrong.
(0020589)
Jon Woodring   
2010-05-05 12:33   
I did a git pull and git submodule update, and recompiled. Is there anything else I need to do.

Also, here is a line from an offending CSV file, split by commas in python:
['16.1584', '362.783', '-1553.62', '1.92099e+09', '6945733', '\x00', '1246895', '199320', '-55.0512', '-23.4989', '-392.343', '671.647', '69.8461', '83.4789', '17.6399']

The sixth element is a null character, which corresponds to vtkGhostLevels.

Also, all of them are 0 for ghost level. Some should be different than 0 to mark ghost cells, if they are to be all output.
(0020590)
Jon Woodring   
2010-05-05 13:11   
(edited on: 2010-05-05 13:13)
I am uncertain about the ghost cell bug now. It appears that it may be correctly outputting vtkGhostLevels. I have to verify though, because of the cosmo data format wrap around on boundaries, is where I thought the bug was from.

Though, the char output (for vtkGhostLevels) is still there.

(0020591)
Jon Woodring   
2010-05-05 13:20   
It appears that ghost levels are fine, so I would ignore that part of the bug, but appears that somehow the char data as char bug as creeped back in.

vtkGhostLevels is unsigned char I believe, and not being output as a int string, but rather as an actual char in the output.
(0020593)
Ken Moreland   
2010-05-05 13:52   
I just checked the behavior of writing a CVS file with a vtkValidPointMask, and that appears to be properly writing numbers instead of raw ASCII, so that fix still appears to be in effect. I don't know why it is treating vtkGhostLevels differently.
(0020733)
Robert Maynard   
2010-05-13 10:21   
Needed to add a template specialization for unsigned char arrays.

ParaView commit SHA1: 4dba9d0d973a000e7adb5de7ebd98441c6848e8b
(0020772)
Alan Scott   
2010-05-17 21:26   
Closed - Untested.
(0021269)
Utkarsh Ayachit   
2010-07-07 10:02   
Verified that this is already in the "release" branch.