MantisBT - ITK |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0009260 | ITK | | public | 2009-07-11 12:03 | 2010-11-07 01:18 |
|
Reporter | Luis Ibanez | |
Assigned To | Luis Ibanez | |
Priority | urgent | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Resolution Date | |
Sprint | |
Sprint Status | |
|
Summary | 0009260: Integer types inconsistency in 64 bits platforms |
Description | Windows 64 bits platforms define "long" as a 32-bits integer. As a consequence, the Index, Size, and Offset types are unable to manage images larger than 2Gb.
|
Steps To Reproduce | |
Additional Information | Thread in the users mailing list:
http://www.itk.org/pipermail/insight-users/2009-July/031463.html [^] |
Tags | No tags attached. |
Relationships | related to | 0008371 | assigned | Bradley Lowekamp | large MetaImage files and 32-bit produces erroneous results |
|
Attached Files | MetaImage64BitsWarnings.patch (47,426) 2009-11-21 13:47 https://public.kitware.com/Bug/file/2683/MetaImage64BitsWarnings.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2009-07-11 12:03 | Luis Ibanez | New Issue | |
2009-07-11 12:05 | Luis Ibanez | Note Added: 0016848 | |
2009-07-11 12:05 | Luis Ibanez | Status | new => confirmed |
2009-07-11 12:05 | Luis Ibanez | Status | confirmed => assigned |
2009-07-11 12:05 | Luis Ibanez | Assigned To | => Luis Ibanez |
2009-07-11 12:05 | Luis Ibanez | Priority | normal => urgent |
2009-07-11 13:33 | Luis Ibanez | Note Added: 0016849 | |
2009-07-12 06:56 | Luis Ibanez | Note Added: 0016850 | |
2009-11-21 13:46 | Luis Ibanez | Note Added: 0018499 | |
2009-11-21 13:47 | Luis Ibanez | File Added: MetaImage64BitsWarnings.patch | |
2009-11-21 14:34 | Luis Ibanez | Note Added: 0018506 | |
2009-11-22 10:01 | Bradley Lowekamp | Relationship added | related to 0008371 |
2010-11-07 01:18 | Luis Ibanez | Note Added: 0022985 | |
Notes |
|
(0016848)
|
Luis Ibanez
|
2009-07-11 12:05
|
|
verified in the following way:
http://www.itk.org/pipermail/insight-users/2009-July/031442.html [^]
#include <iostream>
#include "itkOffset.h"
#include "itkNumericTraits.h"
int main()
{
unsigned long tt;
std::cout << "size = " << sizeof(tt) << std::endl;
tt = -1;
std::cout << "tt = " << tt << std::endl;
typedef itk::Offset<3> OffsetType;
typedef OffsetType::OffsetValueType OffsetValueType;
OffsetValueType offsetValue;
std::cout << "sizeof(offsetValue) = " << sizeof( offsetValue ) <<
std::endl;
offsetValue = itk::NumericTraits< OffsetValueType >::max();
std::cout << "OffsetValueType max() = " << offsetValue << std::endl;
return EXIT_SUCCESS;
}
|
|
|
(0016849)
|
Luis Ibanez
|
2009-07-11 13:33
|
|
In order to be consistent across platforms and across architectures we suggest that the types should be:
ptrdiff_t for OffsetValueType (this is signed)
size_t for SizeValueType (this is unsigned)
ptrdiff_t for IndexValueType (this is signed)
and that the use of "int" and "long" should be discouraged when loading values into these variables. Instead developers should use the Traits from the ImageType as
ImageType::OffsetValueType
ImageType::SizeValueType
ImageType::IndexValueType
More details in the discussion at:
http://www.itk.org/pipermail/insight-users/2009-July/031466.html [^] |
|
|
(0016850)
|
Luis Ibanez
|
2009-07-12 06:56
|
|
First pass of changes committed:
Introducing Traits for IndexValueType, SizeValueType and OffsetType.
Replacing explicit use of "long" in the Tests, when refering to this concepts.
Also expanded use of SpacingValueType and PointValueType.
In general,
all these types should have always been obtained as Traits of the Image... |
|
|
(0018499)
|
Luis Ibanez
|
2009-11-21 13:46
|
|
Adding patch for the MetaImage library.
Most of the changes are related to
METAIO_STL::streampos
METAIO_STL::streamoff
METAIO_STL::streamsize |
|
|
(0018506)
|
Luis Ibanez
|
2009-11-21 14:34
|
|
Julien committed the patch.
Thanks ! |
|
|
(0022985)
|
Luis Ibanez
|
2010-11-07 01:18
|
|
This is still an issue, and requires a toolkit-wide review for correcting it. |
|