<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Ok that makes sense.<br>But why do I then see a New() method in the doxygen documentation on the web?<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Bill Lorensen <bill.lorensen@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Maarten Beek <beekmaarten@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> insight-users@itk.org<br><b><span style="font-weight: bold;">Sent:</span></b> Wed, April 21, 2010 3:17:47 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] Creating itkHistogramImageToImageMetric object
fails<br></font><br>
HistogramImageToImageMetric has no New() method. It is an abstract<br>class. It can only be used as a base class. You need to create one of<br>its derived classes.<br><span><a target="_blank" href="http://public.kitware.com/Insight/Doxygen/html/classitk_1_1HistogramImageToImageMetric.html">http://public.kitware.com/Insight/Doxygen/html/classitk_1_1HistogramImageToImageMetric.html</a></span><br><br>Bill<br><br>On Wed, Apr 21, 2010 at 10:41 AM, Maarten Beek <<a ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br>> Why does the following code not compile?<br>><br>> const unsigned int Dimension = 3;<br>> typedef double ImagePixelType;<br>> typedef itk::Image<ImagePixelType, Dimension> ImageType;<br>> typedef itk::HistogramImageToImageMetric<ImageType,ImageType> HistType;<br>> HistType::Pointer Metric = HistType::New();<br>><br>> error C2440:
'initializing' : cannot convert from 'itk::Object::Pointer' to<br>> 'itk::SmartPointer<TObjectType>'<br>><br>><br>> _____________________________________<br>> Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at<br><span>> <a target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br>><br>> Kitware offers ITK Training Courses, for more information visit:<br><span>> <a target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a></span><br>><br>> Please keep messages on-topic and check the ITK FAQ at:<br><span>> <a target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br>><br>> Follow this link to subscribe/unsubscribe:<br><span>> <a
target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br>><br>><br></div></div>
</div><br>
</body></html>