<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What compiler are you using? Have you tried gcc-4.2 instead of clang? I don't think that 3.20 would have been tested and build with the new clang.<div><br></div><div>Brad</div><div><br><div><div>On Jul 10, 2012, at 12:43 PM, ariel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>I've had some troubles after xcode update (from 4.1 to 4.3.3).<br><br>When I compiled ITK-3.20.1 I had too many warnings like this: <br>InsightToolkit-3.20.1/Utilities/vxl/core/vnl/vnl_math.h:86:36: warning:<br>in-class initializer for static data member of type 'const double' is a GNU<br>extension [-Wgnu] static VNL_DLL_DATA const double e<br>VCL_STATIC_CONST_INIT_FLOAT_DECL(2.7182818284590452354);<br><br><br><br>Second, I made a simple program and I can't explain why this code exit with<br>segmentation fault:<br><br>typedef itk::CastImageFilter < MovingImageType, InternalImageType > <br>MovingCasterType;<br> MovingCasterType::Pointer movingImageCaster =<br>MovingCasterType::New();<br> movingImageCaster->SetInput( movingImageReader->GetOutput() );<br><br><br> std::cout<<"0"<<std::endl;<br> try<br> {<br> movingImageCaster->Update();<br> }<br><span class="Apple-tab-span" style="white-space:pre">        </span> catch( itk::ExceptionObject & err )<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>{<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>std::cout << "ExceptionObject caught !" << std::endl;<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>std::cout << err << std::endl;<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return -1;<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br><br><br><br>The input of the caster filter is:<br><br>Image (0x7fc201cda600)<br> RTTI typeinfo: itk::Image<double, 2u><br> Reference Count: 3<br> Modified Time: 307<br> Debug: Off<br> Observers: <br> none<br> Source: (0x7fc201cde1f0) <br> Source output index: 0<br> Release Data: Off<br> Data Released: False<br> Global Release Data: Off<br> PipelineMTime: 179<br> UpdateMTime: 308<br> LargestPossibleRegion: <br> Dimension: 2<br> Index: [0, 0]<br> Size: [800, 600]<br> BufferedRegion: <br> Dimension: 2<br> Index: [0, 0]<br> Size: [800, 600]<br> RequestedRegion: <br> Dimension: 2<br> Index: [0, 0]<br> Size: [800, 600]<br> Spacing: [1, 1]<br> Origin: [0, 0]<br> Direction: <br>1 0<br>0 1<br><br> IndexToPointMatrix: <br> 1 0<br>0 1<br><br> PointToIndexMatrix: <br> 1 0<br>0 1<br><br> PixelContainer: <br> ImportImageContainer (0x7fc201cde360)<br> RTTI typeinfo: itk::ImportImageContainer<unsigned long, double><br> Reference Count: 1<br> Modified Time: 306<br> Debug: Off<br> Observers: <br> none<br> Pointer: 0x108d15000<br> Container manages memory: true<br> Size: 480000<br> Capacity: 480000<br><br><br>Thanks,<br>Ariel.<br><br>--<br>View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/CastImageFilter-Error-tp7580458.html">http://itk-insight-users.2283740.n2.nabble.com/CastImageFilter-Error-tp7580458.html</a><br>Sent from the ITK Insight Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>