Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 833
    • Issues 833
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 241
    • Merge requests 241
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #13744
Closed
Open
Issue created Dec 18, 2012 by Kitware Robot@kwrobotOwner

vtkDataReader and vtkDataWriter don't agree on signed char

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


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.

Assignee
Assign to
Time tracking