Sean,

Look at the file link below on github.

This old version of OpenJPEG2000 is compiled as a C library, but we use it from 
a C++. When compiled from C it defined the "bool" type as int. And sizeof (int) 
!= sizeof(bool) for gcc on linux, x86 osx, and VS. On these systems it's just a 
byte. So I hacked it to define bool as "unsigned char". As the ITK dashboard 
shows, this works ok every where except mini0 with ppc running in software:

http://open.cdash.org/testSummary.php?project=2&name=itkJPEG2000Test01&date=2013-05-28

The correct thing to do is to upgrade to a more recent OPENJPEG2000 library, 
but that is non-trivial due to GDCM depending on the manipulated version in 
ITK. I know we had some problems with JPEG2000 in GDCM, at least related to 
streaming:

https://issues.itk.org/jira/browse/ITK-117


I am having a little trouble with the getting the try_run to work. So I am 
debating about just hard coding the PPC case in the pre-processor. Also note 
that ITK's OpenJpeg2000 ImageIO is "just" in review.

What are your suggestions?

Brad



On May 28, 2013, at 10:32 AM, Sean McBride <[email protected]> wrote:

> On Tue, 28 May 2013 08:53:43 -0400, Bradley Lowekamp said:
> 
>> My hack for JPEG2000's 1.2 bool issue:
>> 
>> https://github.com/Kitware/ITK/commit/a7eee65
>> 
>> is not working for OSX ppc:
>> 
>> http://open.cdash.org/viewTest.php?onlyfailed&buildid=2920031
>> 
>> because sizeof(bool) there is 4. So it looks like I'll need to do a try
>> compile thing to get the right size... it'll still be a hack until we
>> can upgrade to JPEG2000 2.0.
> 
> Please never do try-compiles for such things, it doesn't work with OS X 
> 'universal binaries' where a single library is simultaneously built for 
> multiple architectures, any of which may have different sizes for pointers, 
> bools, ints, etc.
> 
> (I haven't followed this issue, but the language does not require a specific 
> size of 'bool', why do you care?)
> 
> Cheers,
> 
> -- 
> ____________________________________________________________
> Sean McBride, B. Eng                 [email protected]
> 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

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

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-developers

Reply via email to