[Insight-developers] Large metaImage file with 32-bit build

Stephen Aylward Stephen.Aylward at kitware.com
Thu Jan 15 11:31:41 EST 2009


On Thu, Jan 15, 2009 at 11:14 AM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Hello,
> I am also concerned about what you say about the recommended type changing.
> In my 2001 edition of Stroustrup's "The C++ Programming Language" in section
> 21.6.1 It shows that the definition of the seekg and tellp utilize pos_type
> and off_type. I am not sure how long it took to get these type to the
> compilers though. However, I would be surprised if all of the compilers that
> are supported have this type correctly.

Agreed.   Surely KWSys has addressed this before...might want to turn
to them for some code (but we should not make metaIO dependent on
kwsys - we'll just copy the magic).

> I am surprised that the MetaIO library does not have more typedef and checks
> of this kind. Is there any reason for this?

Uh...if it ain't broke, don't fix it :)

Do you know of a case other than this (reading beyond 4gigs) that
MetaIO doesn't correctly handle at this time?

s

>
> This is likely a good case to use some CMake magic to check how this type is
> defined in different compilers.
> Brad
> On Jan 15, 2009, at 10:27 AM, Stephen Aylward wrote:
>
> Makes sense.
>
> Should be backward compatible.
>
> Is your suggested type available on all compilers and platforms?
> Note the comment regarding BCC.
>
> Funny thing - two years ago the right way to do this was to use
> size_t, and that is what tellp, etc returned.  I'm a bit concerned
> that old compilers and won't support your changes, so we may have to
> use a compiler-specific typedef.
>
> s
>
> On Wed, Jan 14, 2009 at 5:33 PM, Bradley Lowekamp
> <blowekamp at mail.nih.gov> wrote:
>
> Hi Stephen,
>
> You seem to be the one closes to the meta utility library. I ran into a
>
> problem when I was trying to stream the visible human. I was doing some out
>
> of core processing on it :) The results were wrong, and looked like there
>
> was some 32-bit limitation related error. I was able to tack the problem
>
> down. I posted the problem and a suggested solution in Matis here:
>
> http://www.itk.org/Bug/view.php?id=8371
>
> Overall the types used for files may need a closer look in the library.
>
> After your explanation of the immediate pervasiveness of this library, I am
>
> rather cautious of it. This look it may be some extensive changes of types
>
> needed. What is the best way to proceed here?
>
> Thanks,
>
> Brad
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>



-- 
Stephen R. Aylward, Ph.D.
Chief Medical Scientist
Kitware, Inc. - North Carolina Office
http://www.kitware.com
(518) 371-3971 x300


More information about the Insight-developers mailing list