<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 &lt;bill.lorensen@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Maarten Beek &lt;beekmaarten@yahoo.com&gt;<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 &lt;<a ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>&gt; wrote:<br>&gt; Why does the following code not compile?<br>&gt;<br>&gt; const unsigned int Dimension = 3;<br>&gt; typedef double ImagePixelType;<br>&gt; typedef itk::Image&lt;ImagePixelType, Dimension&gt; ImageType;<br>&gt; typedef itk::HistogramImageToImageMetric&lt;ImageType,ImageType&gt; HistType;<br>&gt; HistType::Pointer Metric = HistType::New();<br>&gt;<br>&gt; error C2440:
 'initializing' : cannot convert from 'itk::Object::Pointer' to<br>&gt; 'itk::SmartPointer&lt;TObjectType&gt;'<br>&gt;<br>&gt;<br>&gt; _____________________________________<br>&gt; Powered by <a target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br><span>&gt; <a target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br>&gt;<br>&gt; Kitware offers ITK Training Courses, for more information visit:<br><span>&gt; <a target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a></span><br>&gt;<br>&gt; Please keep messages on-topic and check the ITK FAQ at:<br><span>&gt; <a target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br><span>&gt; <a
 target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br>&gt;<br>&gt;<br></div></div>
</div><br>

      </body></html>