Your typedef for RGBImageType does not have a template parameter for dimension.<div><br></div><div>Also, it&#39;d be nice if you posted your solution to your previous error for the benefit of other ITK users that may encounter the same problem.<br>
<br><div class="gmail_quote">On Thu, Jun 30, 2011 at 8:45 AM, john smith <span dir="ltr">&lt;<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello to all,<br><br>I had used the itkLabelOverlayImageFilter  in 2D and I didn;t have any problem. No I am trying to use tis filter in 3D. I have written exactly the same code but for 3D, and I get this error which I don&#39;t know what exactly means.<br>

<br>the error is the following:<br>error C2440: &#39;initializing&#39; : cannot convert from &#39;itk::Concept::Detail::UniqueType_unsigned_int&lt;__formal&gt;&#39; to &#39;itk::Concept::Detail::UniqueType_unsigned_int&lt;__formal&gt;&#39;<br>

<br>I hope someone could help me. <br>Thanks in advance<br><br>///////////// code///////////<br> typedef itk::Image&lt;unsigned char, 3&gt;  ImageType;<br>   ImageType::Pointer image1 = ImageType::New();<br>   ImageType::Pointer image_label = ImageType::New();<br>

 <br>   typedef   unsigned char           InternalPixelType_add;<br>   const     unsigned int    Dimension = 3;<br>   typedef itk::Image&lt; InternalPixelType_add, Dimension &gt;  InternalImageType_add;<br>   typedef  itk::ImageFileReader&lt; InternalImageType_add &gt; ReaderType_add;<br>

<br>    ReaderType_add::Pointer reader1 = ReaderType_add::New();<br>    reader1-&gt;SetFileName( fileName.toStdString()  );<br>    reader1-&gt;Update();<br>    image1 = reader1-&gt;GetOutput();<br><br>    ReaderType_add::Pointer reader2 = ReaderType_add::New();<br>

    reader2-&gt;SetFileName( &quot;result.hdr&quot;  );<br>    reader2-&gt;Update();<br>    image_label = reader2-&gt;GetOutput();<br><br><br>  typedef itk::RGBPixel&lt;unsigned char&gt; RGBPixelType;<br>  typedef itk::Image&lt;RGBPixelType&gt; RGBImageType;<br>

 <br>  typedef itk::LabelOverlayImageFilter&lt;ImageType, ImageType, RGBImageType&gt; <br>                                       LabelOverlayImageFilterType;<br>  LabelOverlayImageFilterType::Pointer labelOverlayImageFilter = LabelOverlayImageFilterType::New();<br>

  labelOverlayImageFilter-&gt;SetInput(image1);<br>  labelOverlayImageFilter-&gt;SetLabelImage(image_label);<br> // labelOverlayImageFilter-&gt;SetOpacity(.5);<br>  labelOverlayImageFilter-&gt;SetOpacity(1.0);<br>  labelOverlayImageFilter-&gt;ResetColors(); // reset color map<br>

  labelOverlayImageFilter-&gt;AddColor(0, 0, 255); // fill color map with blue<br>  labelOverlayImageFilter-&gt;SetBackgroundValue(0); // don&#39;t overlay the background, i.e., label 0<br>  labelOverlayImageFilter-&gt;Update();<br>

 <br>  typedef  itk::ImageFileWriter&lt; RGBImageType  &gt; WriterType;<br>  WriterType::Pointer writer = WriterType::New();<br>  writer-&gt;SetFileName(&quot;output.hdr&quot;);<br>  writer-&gt;SetInput(labelOverlayImageFilter-&gt;GetOutput());<br>

  writer-&gt;Update();<br><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>