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

Luis Ibanez luis.ibanez at kitware.com
Mon Jul 13 15:00:45 EDT 2009


Sean,

Yes,
this is indeed that same problem of truncating 32 bits to 64 bits.

I don't see another option different from biting the bullet and
fixing the many occurrences in the code... It is not fun, but large
images are one of the few certain things in our future, and
pretty much all computers sold today are 64 bits.


A tempting option is to follow the approach we used for fixing
the Coding Style:

                Working directory by directory.


E.g. fix first all the issues in Code/Common by compiling and
running only Code/Common and Testing/Code/Common.

Then follow with BasicFilter,
Then Numerics
Then Algorithms
... and so on....



    Luis


------------------------------------------------------------------------------------
On Mon, Jul 13, 2009 at 1:01 PM, Sean McBride <sean at rogue-research.com>wrote:

> On 7/13/09 12:04 PM, Michael Jackson said:
>
> >>      This looks like an absolutely massive effort you are attempting
> >> here. I have grepped through the iterator classes are there alot of
> >> incorrect usages of long:
> >>
> >> itkImageRegionReverseConstIterator.h:    m_SpanEndOffset = this-
> >> >m_BeginOffset - static_cast<long>(this->m_Region.GetSize()[0]);
> >
> >So that is a "bug" and should be corrected. This effort will help get
> >rid of those.. I hope. Turning on -Wall may help track those down a
> >bit easier but with the size of the code base of ITK there is going to
> >be a large effort to track those down.
>
> -Wall won't help, it's enabled on many nightlies and gives green
> dashboards.
>
> This reminds me of when I tried to turn on gcc's -Wshorten-64-to-32
> (only in Apple's fork of gcc IIRC).  There were zillions of warnings,
> most legit, but most requiring many many changes, including to public
> APIs.  There are many explicit casts as well as many implicit casts that
> need fixing.  It would be a massive effort.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090713/943d256a/attachment.htm>


More information about the Insight-users mailing list