[Insight-developers] Re: [Insight-users] Resampling 64-bit crash
Luis Ibanez
luis.ibanez at kitware.com
Thu Feb 15 13:38:28 EST 2007
Hi Peter,
Yes, it seems that we should review many classes in order to
make a widespread use of the types that will be appropriate
for representing offsets in 64-bits.
During the release of ITK-3.0 we already did a good number of
updates, that were pointed out by warnings. Many of them were
related to size_t and size_type as they are used by std::
containers. We probably should take this review one step
further for ITK 3.2.
Regards,
Luis
----------------
Peter Cech wrote:
> On Thu, Feb 15, 2007 at 14:21:32 +0000, Florian Pierron wrote:
>
>>Hi Peter,
>>
>>For me as well, it's 8 for both.
>>
>>I think after recompiling the project properly, the resampling test is
>>working now. But I don't know how many itk files I should apply the
>>modification: long to long long and which itk filters will work and
>>which won't... So telling the compiler to code long on 8 byte seems the
>>easiest thing to do (if possible) but even so I'm not sure this would be
>>enough to make ITK handle 64-bit addressing properly...
>
>
> My guess is that with 8 byte longs, most of the filters will behave
> correctly (maybe try looking for 'memory model' or 'code model' to
> change it). I have looked into MetaIO code and it is using int in
> several places, so this will need to be fixed to handle loading/saving
> of big images. There might be several other places like that.
>
> @ ITK developers: What do you think about using size_t and ptrdiff_t for
> all size and offset variables in ITK?
>
> Regards,
> Peter Cech
>
>
>
>>Thanks for your help,
>>Florian
>>
>>On 15/02/2007 11:37, Atwood, Robert C wrote:
>>
>>>>What is the result of sizeof(size_t) and sizeof(ptrdiff_t)?
>>>>(Both types are from <cstddef> header.)
>>>>
>>>
>>>My results: 8 for both. Some details of compiler/system below.
>>>Hope it helps. Allocation appears to work but file i/o (.mhd or .hdr so
>>>far tested) does not, for such large files.
>>>Hope it helps find the problems.
>>>
>>>Many thanks,
>>>Robert
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-developers
mailing list