View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008665VTK(No Category)public2009-03-04 02:112016-08-12 09:55
ReporterCarlos Barrales Ruiz 
Assigned ToKitware Robot 
PrioritynormalSeveritytweakReproducibilityalways
StatusclosedResolutionmoved 
PlatformLinux x86/x86_64OSUbuntuOS Version8.10 (ES.UTF-8)
Product Version 
Target VersionFixed in Version 
Summary0008665: Locale-dependant internal parsers (ej: sscanf/strtod) fails to interpret correctly float fields.
DescriptionSpecifically in vtkDICOMParser, float parsing functions (sscanf) are unable to interpret correctly float values due locale-dependant decimal separator.

This behavior makes DICOMParser to generate a unorderer voxel without measurement and wrong calculations, causing ugly warnings like:

ERROR: In /usr/devel/lib/VTK-5.2.1/Filtering/vtkImageData.cxx, line 1473
vtkImageData (0x4b9e930): GetScalarPointer: Pixel (0, 0, -2147483648) not in memory.
 Current extent= (0, 255, 0, 255, 0, 59)

ERROR: In /usr/devel/lib/VTK-5.2.1/Filtering/vtkImageData.cxx, line 1473
vtkImageData (0x4b9e930): GetScalarPointer: Pixel (0, 0, -2147483648) not in memory.
 Current extent= (0, 255, 0, 255, 0, 59)
Steps To ReproduceCode:

vtkImageData* img = vtkImageData::New();
char *oldLocale = setlocale (LC_NUMERIC, "C");
vtkDICOMImageReader* reader= vtkDICOMImageReader::New();
reader->SetDirectoryName(thePath);
reader->Update();
img->DeepCopy(reader->GetOutput());
setlocale (LC_NUMERIC, old)
viewer->SetImage(img);

Trivial Fix:

vtkImageData* img = vtkImageData::New();
char *oldLocale = setlocale (LC_NUMERIC, "C");
vtkDICOMImageReader* reader= vtkDICOMImageReader::New();
reader->SetDirectoryName(thePath);
reader->Update();
img->DeepCopy(reader->GetOutput());
setlocale (LC_NUMERIC, old)
viewer->SetImage(img);

or launching with LC_NUMERIC setted.
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0015528)
Carlos Barrales Ruiz (reporter)
2009-03-04 02:16

Code to reproduce is obviusly wrong, so LC_NUMERIC should be, by example: es_ES.UTF-8
(0037061)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

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

 Issue History
Date Modified Username Field Change
2009-03-04 02:11 Carlos Barrales Ruiz New Issue
2009-03-04 02:16 Carlos Barrales Ruiz Note Added: 0015528
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037061
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team