<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>I am able to repoduce the problem with the given code only with xcode. I am running:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Max OS X 10.4.7</DIV><DIV>powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5341)</DIV><DIV>Xcode 2.3</DIV><DIV>cmake version 2.4-patch 2</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>When I use a "Unix MakeFiles"  all works fine. But when I use Xcode I am still getting the same error. I added printing of the thrown exception to the code and this is the output produced:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>:~/temp/iotest blowek1$ Debug/iotest -2 -d 256 256 rgb -f test.tiff -v 128</DIV><DIV>Filename: test.tiff Dimensions: 256 256 -1  Value: 128 Type: Rgb</DIV><DIV>Can't write test.tiff </DIV><DIV>itk::ExceptionObject (0x256fdd0)</DIV><DIV>Location: "virtual bool itk::ImageIOBase::SetPixelTypeInfo(const std::type_info&amp;)" </DIV><DIV>File: /nfs/mead/Users/blowek1/software/InsightToolkit-2.8.1/Code/IO/itkImageIOBase.cxx</DIV><DIV>Line: 340</DIV><DIV>Description: itk::ERROR: TIFFImageIO(0x256fa00): Pixel type currently not supported. typeid.name = N3itk8RGBPixelIhEE</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With this version of ITK I needed to change the version of CMake I was using. Perhaps I should build all the testing for ITK and do a more complete check. Is there any xcode builds on the dashboard?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks</DIV><BR><DIV><DIV>On Jul 14, 2006, at 3:40 PM, Kent Williams wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> I've tried to duplicate this with the current CVS for Insight, and I've not been able to duplicate it.  I've attached my test program. Never saw anything resembling this error message.<BR> <BR> The command line to generate a RGB Image file (in any format that supports RGB) is this:<BR> <BR> ImageGenerate -2 -d 256 256 rgb -f test.tiff -v 128<BR> <BR> -2 means 2D, -d 256 256 means 256x256 image size, 'rgb' means use itk::RGBPixel&lt;unsigned char&gt; as the pixel type,  -f test.tiff means write to test.tiff, -v 128 means set every pixel to a value of 128.<BR> <BR> Bradley Lowekamp wrote: <BLOCKQUOTE cite="mid8628B912-62CE-4C58-A083-F5383906F981@mail.nih.gov" type="cite">  <DIV>I have been using itk::ImageFileWriter with pixel type itk::RGBPixel&lt;unsigned char&gt; to write my images and it was all working. With this useful function to wrap it:</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 16px;"><BR>  </DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" color="#760f50" face="Monaco">template</FONT><FONT class="Apple-style-span" face="Monaco">&lt;</FONT><FONT class="Apple-style-span" color="#760f50" face="Monaco">class</FONT><FONT class="Apple-style-span" face="Monaco"> ImageType&gt;</FONT><FONT class="Apple-style-span" face="Monaco"> </FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" color="#760f50" face="Monaco">void</FONT><FONT class="Apple-style-span" face="Monaco"> WriteImage(</FONT><FONT class="Apple-style-span" color="#760f50" face="Monaco">typename</FONT><FONT class="Apple-style-span" face="Monaco"> ImageType::ConstPointer image,  </FONT><FONT class="Apple-style-span" color="#760f50" face="Monaco">const</FONT><FONT class="Apple-style-span" face="Monaco"> std::string fname) {</FONT></DIV>  <DIV style="margin: 0px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><FONT class="Apple-style-span" face="Monaco">std::cout &lt;&lt; </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"writing image \""</FONT><FONT class="Apple-style-span" face="Monaco"> &lt;&lt; fname &lt;&lt; </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"\"..."</FONT><FONT class="Apple-style-span" face="Monaco"> &lt;&lt; std::flush;</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">   </FONT><FONT class="Apple-style-span" color="#760f50" face="Monaco">typedef</FONT><FONT class="Apple-style-span" face="Monaco">  </FONT><FONT class="Apple-style-span" face="Monaco">itk::ImageFileWriter&lt; </FONT><FONT class="Apple-style-span" face="Monaco">  </FONT><FONT class="Apple-style-span" face="Monaco">ImageType</FONT><FONT class="Apple-style-span" face="Monaco">  </FONT><FONT class="Apple-style-span" face="Monaco">&gt; WriterType;</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">   </FONT><FONT class="Apple-style-span" color="#760f50" face="Monaco">typename</FONT><FONT class="Apple-style-span" face="Monaco"> WriterType::Pointer writer = WriterType::New();</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">   </FONT><FONT class="Apple-style-span" face="Monaco">writer-&gt;SetFileName( fname.c_str() );</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">   </FONT><FONT class="Apple-style-span" face="Monaco">writer-&gt;SetInput(image);</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">   </FONT><FONT class="Apple-style-span" face="Monaco">writer-&gt;Update();</FONT></DIV>  <DIV style="margin: 0px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><FONT class="Apple-style-span" face="Monaco">std::cout&lt;&lt; </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"done."</FONT><FONT class="Apple-style-span" face="Monaco"> &lt;&lt; std::endl;</FONT></DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco">}</FONT></DIV>  <DIV style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 16px;"><BR>  </DIV>  <DIV style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 16px;"><BR>  </DIV>  <DIV> I am now trying to use ITK 2.8.1 and no matter what file type I try saving as I am getting a message similar to:</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>Description: itk::ERROR: VTKImageIO(0x166f6d0): Pixel type currently not supported. typeid.name = N3itk8RGBPixelIhEE</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>I have tried tiff,png,jpg all with the same results. Perhaps something changed in this version? Grepping around in the test I see that the writers now use SetImageIO (not sure if this is new)?</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>I switched to 2.8.1 to use the <FONT class="Apple-style-span" face="Monaco">itk::Statistics::ChiSquareDistribution class. The ITK_USE_REVIEW or the Code/Review does not include installation of the headers is libraries (not sure if this is on purpose). </FONT></DIV>  <DIV><FONT class="Apple-style-span" face="Monaco"><BR class="khtml-block-placeholder">  </FONT></DIV>  <DIV><FONT class="Apple-style-span" face="Monaco"><BR class="khtml-block-placeholder">  </FONT></DIV>  <DIV><FONT class="Apple-style-span" face="Monaco">Thanks,</FONT></DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">========================================================</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">Bradley Lowekamp <SPAN class="Apple-converted-space"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">Management Systems Designers Contractor for</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">Office of High Performance Computing and Communications</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3">National Library of Medicine<SPAN class="Apple-converted-space"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal;" face="Helvetica" size="3"><A href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</A></FONT></DIV>  </DIV>  <BR>  <PRE wrap=""><HR size="4" width="90%">_______________________________________________
Insight-users mailing list
<A class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</A>
<A class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A>   </PRE></BLOCKQUOTE> </BLOCKQUOTE></DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">========================================================</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Bradley Lowekamp <SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Management Systems Designers Contractor for</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Office of High Performance Computing and Communications</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">National Library of Medicine<SPAN class="Apple-converted-space"> </SPAN></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><A href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</A></FONT></P>  </DIV><BR></BODY></HTML>