<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>I have been using itk::ImageFileWriter with pixel type itk::RGBPixel<unsigned char> 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-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" color="#760F50" face="Monaco">template</FONT><FONT class="Apple-style-span" face="Monaco"><</FONT><FONT class="Apple-style-span" color="#760F50" face="Monaco">class</FONT><FONT class="Apple-style-span" face="Monaco"> ImageType></FONT><FONT class="Apple-style-span" face="Monaco"> </FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco">std::cout << </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"writing image \""</FONT><FONT class="Apple-style-span" face="Monaco"> << fname << </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"\"..."</FONT><FONT class="Apple-style-span" face="Monaco"> << std::flush;</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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< </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">> WriterType;</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco"> </FONT><FONT class="Apple-style-span" face="Monaco">writer->SetFileName( fname.c_str() );</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco"> </FONT><FONT class="Apple-style-span" face="Monaco">writer->SetInput(image);</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco"> </FONT><FONT class="Apple-style-span" face="Monaco">writer->Update();</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><FONT class="Apple-style-span" face="Monaco">std::cout<< </FONT><FONT class="Apple-style-span" color="#891315" face="Monaco">"done."</FONT><FONT class="Apple-style-span" face="Monaco"> << std::endl;</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco">}</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; min-height: 16px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Monaco; 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> <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>