[vtk-developers] [VTK 0013744]: vtkDataReader and vtkDataWriter don't agree on signed char

Mantis Bug Tracker mantis at public.kitware.com
Wed Dec 19 06:40:43 EST 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://vtk.org/Bug/view.php?id=13744 
====================================================================== 
Reported By:                Gert Wollny
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   13744
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     backlog
Project:                    Kitware 
Type:                       incorrect functionality 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2012-12-19 06:40 EST
Last Modified:              2012-12-19 06:40 EST
====================================================================== 
Summary:                    vtkDataReader and vtkDataWriter don't agree on
signed char
Description: 
vtkDataWriter indicates in the data file that an array is of type "signed char"
by writing out the string "signed_char": 

vtkDataWriter.cxx:1074 
    case VTK_SIGNED_CHAR:
      {
      sprintf (str, format, "signed_char"); *fp << str; 
      signed char *s=
        static_cast<vtkSignedCharArray *>(data)->GetPointer(0);
      vtkWriteDataArray(fp, s, this->FileType, "%hhd ", num, numComp);
      }
    break;

however, vtkDataReader checks for the string "char": 
vtkDataReader.cxx:1446

  else if ( ! strncmp(type, "char", 4) )
    {
    array = vtkCharArray::New();
    array->SetNumberOfComponents(numComp);
  

As a result, a "signed char" data array stored by using vtkDataWriter can not be
read back. 
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-12-19 06:40 Gert Wollny    New Issue                                    
======================================================================




More information about the vtk-developers mailing list