[Insight-users] Image offset is giving bad pointer for large datasets (7Gb)

Arunachalam Kana Kana.Arunachalam at fh-wels.at
Wed Jul 8 08:50:37 EDT 2009


Hi,

 

Machine details: Windows XP, visual studio 2008,  64 bit platform, 64Gb
Ram

Image size: 1442 x 1566 x 1657 ( approx 7Gb )

Other libraries: Along with ITK, VTK and VTK Edge is also used. VTK Edge
is used for changing vtk image to itk image and vice versa.

 

Problem:

In ITK the OffsetValueType is long. Range of long datatype:
-2,147,483,648 to 2,147,483,647 

But the image m_OffsetTable values of type OffsetValueType are : 1;
1442; 2258172;  3,741,791,004

In the above, it is clearly seen that the image offset value exceeds the
OffsetValueType range.

 

Correction attempts:

1.       I changed the OffsetValueType to unsigned long to increase the
range. Unsigned long range : 0 to 4,294,967,295. But

this gives problems on conversion back to vtk. The vtkdataarray created
has a variable maxID which is of VtkIDType.

VtkIDType is of long long. The maxID contains the value = -553,176,292. 

 

Correlation between  3,741,791,004 and -553,176,292.

Decimal                                               Hexa

3,741,791,003                                    DF07331B

-553,176,292                  FFFFFFFF DF07331B            

 

So, the program crashes due to bad pointer when it used vtkdata array
details to draw histogram.

I think the probelm here is assigning of unsigned long to long long. I
don't want to change the 

Vtk data type to unsigned long, so in next attempt i change the itk
OffsetValueType to long long.

 

2.       I changed the itk OffsetValueType to long long, but this leads
to change of lot of several other

variable type in different file. Specially some of the basic image
container variables like TElementIdentifier, TElement have to be
changed.

For now I only can give these 2 variable, but i am afraid more variable
data types have to be changed in the future. 

 

I would be glad to have some help to solve this problem.

 

Regards,

Kana

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090708/e7bdcba2/attachment.htm>


More information about the Insight-users mailing list