View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011989ParaViewBugpublic2011-03-19 04:482016-08-12 09:58
ReporterFlorian Kummer 
Assigned ToCory Quammen 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86OSWindowsOS Version7
Product Version3.8.1 
Target VersionFixed in Version 
Summary0011989: Base64 encoding of VTK output
DescriptionMaybe the Base64 - encoding/decoding is not standart-conform?

As far as I understood, the decoded stream is in the format
{int n, float d[0], ... , float d[n-1]}

I exported a very simple example with Paraview;
I'm able to decode the floats, but the leading integer is just wrong;
I'm pretty sure that my decoder works correctly, because it decodes some example from wikipedia (http://de.wikipedia.org/wiki/Base64#Beispiel [^]) correctly,
as well as it decodes the floats correctly;
Steps To ReproduceLoad attached file test-ascii.vtr in Paraview, and save data as Rectilinear VTK, binary, no compression;

Open the new file, copy and paste some of the strings to the program VTR_Demo_.c (i've allready done that)

Compile the attached program VTR_Demo_.c;
In line 138, 141, 144 you'll find three examples of Base64-Encoded data, allways two of them commented out;
One is a reference (from http://de.wikipedia.org/wiki/Base64#Beispiel [^]), and the other two's came from the Paravie VTR export;

Run the Program, on the output you will see the leading integer of the data stream, as well as the next three floats;
The integer is wrong;
TagsNo tags attached.
Project
Topic Name
Type
Attached Files? file icon test-ascii.vtr [^] (963 bytes) 2011-03-19 04:48
? file icon test-binary.vtr [^] (1,053 bytes) 2011-03-19 04:49
c file icon VTR_Demo_.c [^] (6,739 bytes) 2011-03-19 04:50

 Relationships

  Notes
(0025834)
Robert Maynard (developer)
2011-03-20 15:13
edited on: 2011-03-20 16:07

You should read how the binary format is constructed on this wiki page:
http://www.vtk.org/Wiki/VTK_XML_Formats [^]

The integer doesn't represent the length, the length is derived from the extents and the spacing.

EDIT:
Off the top of my head I don't know what the first integer represents when use base64 encoding.

(0036558)
Cory Quammen (developer)
2016-07-25 12:59

There does not appear to be a problem writing with base64 encoding and then reading the file within ParaView itself.
(0036597)
Cory Quammen (developer)
2016-07-25 22:28

To test:

Start ParaView, local server
Open the attached file test-ascii.vtr
Save the data set with binary encoding to another file name, choose Encode Appended Data
Reopen the data set
All works fine

I don't know what the first integer is, but as far as ParaView is concerned the writer and reader with Base64 encoding works fine.
(0037940)
Kitware Robot (administrator)
2016-08-12 09:58

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-03-19 04:48 Florian Kummer New Issue
2011-03-19 04:48 Florian Kummer File Added: test-ascii.vtr
2011-03-19 04:49 Florian Kummer File Added: test-binary.vtr
2011-03-19 04:50 Florian Kummer File Added: VTR_Demo_.c
2011-03-20 15:13 Robert Maynard Note Added: 0025834
2011-03-20 16:07 Robert Maynard Note Edited: 0025834
2016-07-25 12:59 Cory Quammen Note Added: 0036558
2016-07-25 12:59 Cory Quammen Status backlog => closed
2016-07-25 12:59 Cory Quammen Assigned To => Cory Quammen
2016-07-25 12:59 Cory Quammen Resolution open => no change required
2016-07-25 22:25 Cory Quammen Status closed => backlog
2016-07-25 22:25 Cory Quammen Resolution no change required => reopened
2016-07-25 22:28 Cory Quammen Note Added: 0036597
2016-07-25 22:28 Cory Quammen Status backlog => customer review
2016-07-25 22:28 Cory Quammen Resolution reopened => fixed
2016-08-12 09:58 Kitware Robot Note Added: 0037940
2016-08-12 09:58 Kitware Robot Status customer review => closed
2016-08-12 09:58 Kitware Robot Resolution fixed => moved


Copyright © 2000 - 2018 MantisBT Team