<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Luis,<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Thank you for pointing me towards that example. I forgot that when I need this adaptation I usually code up my own adaptor; it just seemed like it should be in ITK. If this is "typical use" then why is a templated CastPixellAccessor such as the following not part of ITK?<br><div><br></div><div>template <class TInternalType, class TExternalType >
class ITK_EXPORT CastPixelAccessor </div><div>{</div><div><div><br></div><div> static inline void Set(InternalType & output, const ExternalType & input) </div><div> {output = static_cast<InternalType>( input );}</div><div><br></div><div> static inline ExternalType Get( const InternalType & input ) </div><div> {return static_cast<ExternalType>( input ); }</div><div>}; </div></div><div><br></div><div>Brad</div><div><br></div><div><br><div><div>On Mar 24, 2009, at 2:17 PM, Luis Ibanez wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Hi Brad,<br><br><br>The Casting adaptor is the typical use case example<br>for the ImageAdaptors.<br><br>You may want to look at the Example<br><br> Insight/Examples/DataRepresentation/Image/ImageAdaptor1.cxx<br><br>You will find it described in the ITK Software Guide.<br><br><br> Luis<br><br><br>--------------------------<br>Bradley Lowekamp wrote:<br><blockquote type="cite">Hello,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am looking for something like itkCastImageAdaptor. I see <br></blockquote><blockquote type="cite">itkCastImageFilter, but I don't want an extra copy of all my pixels if I <br></blockquote><blockquote type="cite">don't need it. The definition of a CastPixelAccessor seem like it would <br></blockquote><blockquote type="cite">be straight forward enough. Perhaps I am missing some complication that <br></blockquote><blockquote type="cite">this class would cause?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Did I miss an obvious adaptor class?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Brad<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">========================================================<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Bradley Lowekamp <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Lockheed Martin Contractor for<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Office of High Performance Computing and Communications<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">National Library of Medicine <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">blowekamp@mail.nih.gov <<a href="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</a>><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_____________________________________<br></blockquote><blockquote type="cite">Powered by <a href="http://www.kitware.com">www.kitware.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Visit other Kitware open-source projects at<br></blockquote><blockquote type="cite"><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br></blockquote><blockquote type="cite"><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><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><span class="Apple-converted-space"> </span></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="font-family: Arial; "><span class="Apple-style-span" style="font-family: Arial; ">Lockheed Martin </span></span></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">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><br class="Apple-interchange-newline"></span></div></span> </div><br></div></div></body></html>