[Insight-developers] MRCImageIO & Visual Studio 6.0

Bradley Lowekamp blowekamp at mail.nih.gov
Mon Jun 14 14:15:35 EDT 2010


Bill,

I have already committed a:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Review/itkMRCImageIO.cxx?root=Insight&r1=1.1&r2=1.2

but unfortunately we are still getting related errors ( different but related ):
http://www.cdash.org/CDash/viewBuildError.php?buildid=635501

It is likely the overloading of the method which is confusing the poor VS6 compiler:
  
  // internal methods to update the min and max in the header based on
  // the data, in the image buffer to be written
  template<typename TPixelType>
    void UpdateHeaderWithMinMaxMean( const TPixelType * bufferBegin );
  void UpdateHeaderWithMinMaxMean( const void *buffer );

My suggestion would be to rename the second non-templated method. Perhaps I should let some one with the VS6 compiler check to see if this is a working solution instead of my prior shooting in the dark, which didn't solve the issue.

Brad



On Jun 14, 2010, at 2:08 PM, Bill Lorensen wrote:

> I think we have done a) in the past.
> 
> On Mon, Jun 14, 2010 at 1:11 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> 
>> Hi Brad,
>> 
>> 
>> Visual Studio 6.0 seems to be having trouble with
>> 
>> the template instantiations from itkMRCImageIO:
>> 
>> http://www.cdash.org/CDash/viewBuildError.php?buildid=635480
>> 
>> 
>> 
>> :\Dashboards\My Tests\InsightContinuous\Code\Review\itkMRCImageIO.cxx(516) :
>> error C2893: Failed to specialize function template 'void __thiscall
>> itk::Local::MRCImageIO::UpdateHeaderWithMinMaxMean(const TPixelType *)'
>> 
>>        With the following template arguments:
>>        'unsigned char'
>> 
>> 
>> 
>> I believe that VS6 can't resolve templated functions
>> just based on the type of the function argument.
>> 
>> 
>> 
>> Options to consider are:
>> 
>> 
>> A)  instantiating it as:
>> 
>>        f<T>( T arg )
>> 
>> or
>> 
>> 
>> B)  Making that function to be a
>>    templated method member of a class.
>> 
>> 
>> Do you have any preferences between these two options ?
>> 
>> (or maybe other options...?)
>> 
>> 
>> 
>>    Thanks
>> 
>> 
>>       Luis
>> 
>> 
>> _______________________________________________
>> 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.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-developers
>> 
>> 

========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100614/efb767e3/attachment-0001.htm>


More information about the Insight-developers mailing list