Actually, the documentation for AnalyzeImageIO indicates an RGB image is an acceptable image format. Looks like there might be a bug.<br><br><div class="gmail_quote">On Thu, Jun 30, 2011 at 10:25 AM, robert tamburo <span dir="ltr"><<a href="mailto:robert.tamburo@gmail.com">robert.tamburo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">It appears the Analyze file format does not handle RGB images well (should an exception be thrown or concept checking catch this?). If you output the image as a meta or raw image (use .mhd or .raw file name extensions), results should be as expected.<div>
<div></div><div class="h5"><br>
<br><div class="gmail_quote">On Thu, Jun 30, 2011 at 9:48 AM, robert tamburo <span dir="ltr"><<a href="mailto:robert.tamburo@gmail.com" target="_blank">robert.tamburo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you send me Region.hdr and Result.hdr?<div><div></div><div><br><br><div class="gmail_quote">On Thu, Jun 30, 2011 at 9:46 AM, john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have made this change in my previous code and now I do not get any
errors. But when I run the algorithm I get very strange results. I get a volume with confused the red and blue colors and not the blue contour of the label image added on the initial grayscale 3D image. I hope someone could help as I cannot understand the reason why I am getting these results.<div>
<div></div><div><br>
<br>Thanks in advance<br><br><div class="gmail_quote">2011/6/30 john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><div></div><div>I have made this change in my previous code and now I do not get any
errors. But when I run the algorithm I get very strange results. I send a
docx file including the two inputs and the output of
itkLabelOverlayImageFilter. I hope someone to help me as I cannot
understand the reason why I am getting these results.<br>
<br>Thanks in advance<br><br><div class="gmail_quote">2011/6/30 john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div><div></div><div>I have made this change in my previous code and now I do not get any
errors. But when I run the algorithm I get very strange results. I send a
docx file including the two inputs and the output of
itkLabelOverlayImageFilter. I hope someone to help me as I cannot
understand the reason why I am getting these results.<br>
<br>Thanks in advance<br><br><div class="gmail_quote">2011/6/30 john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
I have made this change in my previous code and now I do not get any errors. But when I run the algorithm I get very strange results. I send a docx file including the two inputs and the output of itkLabelOverlayImageFilter. I hope someone to help me as I cannot understand the reason why I am getting these results.<br>
<br>Thanks in advance<div><div></div><div><br><h1 style="font-weight:normal"><span><br></span></h1><br><div class="gmail_quote">2011/6/30 john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">You have right. I will post the solution for 2D immediatly.<br><br>Thanks for your response<div>
<div></div><div><br><br><div class="gmail_quote">2011/6/30 robert tamburo <span dir="ltr"><<a href="mailto:robert.tamburo@gmail.com" target="_blank">robert.tamburo@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Your typedef for RGBImageType does not have a template parameter for dimension.<div><br></div>
<div>Also, it'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"><div><div></div><div>On Thu, Jun 30, 2011 at 8:45 AM, john smith <span dir="ltr"><<a href="mailto:mkitkinsightuser@gmail.com" target="_blank">mkitkinsightuser@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div>
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't know what exactly means.<br>
<br>the error is the following:<br>error C2440: 'initializing' : cannot convert from 'itk::Concept::Detail::UniqueType_unsigned_int<__formal>' to 'itk::Concept::Detail::UniqueType_unsigned_int<__formal>'<br>
<br>I hope someone could help me. <br>Thanks in advance<br><br>///////////// code///////////<br> typedef itk::Image<unsigned char, 3> 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< InternalPixelType_add, Dimension > InternalImageType_add;<br> typedef itk::ImageFileReader< InternalImageType_add > ReaderType_add;<br>
<br> ReaderType_add::Pointer reader1 = ReaderType_add::New();<br> reader1->SetFileName( fileName.toStdString() );<br> reader1->Update();<br> image1 = reader1->GetOutput();<br><br> ReaderType_add::Pointer reader2 = ReaderType_add::New();<br>
reader2->SetFileName( "result.hdr" );<br> reader2->Update();<br> image_label = reader2->GetOutput();<br><br><br> typedef itk::RGBPixel<unsigned char> RGBPixelType;<br> typedef itk::Image<RGBPixelType> RGBImageType;<br>
<br> typedef itk::LabelOverlayImageFilter<ImageType, ImageType, RGBImageType> <br> LabelOverlayImageFilterType;<br> LabelOverlayImageFilterType::Pointer labelOverlayImageFilter = LabelOverlayImageFilterType::New();<br>
labelOverlayImageFilter->SetInput(image1);<br> labelOverlayImageFilter->SetLabelImage(image_label);<br> // labelOverlayImageFilter->SetOpacity(.5);<br> labelOverlayImageFilter->SetOpacity(1.0);<br> labelOverlayImageFilter->ResetColors(); // reset color map<br>
labelOverlayImageFilter->AddColor(0, 0, 255); // fill color map with blue<br> labelOverlayImageFilter->SetBackgroundValue(0); // don't overlay the background, i.e., label 0<br> labelOverlayImageFilter->Update();<br>
<br> typedef itk::ImageFileWriter< RGBImageType > WriterType;<br> WriterType::Pointer writer = WriterType::New();<br> writer->SetFileName("output.hdr");<br> writer->SetInput(labelOverlayImageFilter->GetOutput());<br>
writer->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></div></div>_____________________________________<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>
</blockquote></div><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>
</div></div></blockquote></div><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>
</div></div></blockquote></div><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>
</div></div></blockquote></div><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>
</div></div></blockquote></div><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>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>