<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C5EF6C.EFA065A0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi.<span style='mso-spacerun:yes'>&nbsp; </span>I&#8217;m
trying to extract a single channel (red) from an RGB image and save that as an
8-bit scalar image. <span style='mso-spacerun:yes'>&nbsp;</span>I can then
discard the original RGB image.<span style='mso-spacerun:yes'>&nbsp;
</span>Between the archives and the test/example code from <span class=SpellE>itk</span>
2.2, I tried to use the <span class=SpellE>RGBToVectorImageAdaptor</span>, then
the <span class=SpellE>VectorIndexSelectionCastImageFilter</span>.<span
style='mso-spacerun:yes'>&nbsp; </span>I seem to be having trouble compiling
the code to use my adaptor, though.<span style='mso-spacerun:yes'>&nbsp;
</span>I believe I&#8217;m just confused regarding the true identity of the <span
class=SpellE>RGBToVectorImageAdaptor&#8217;s</span> output type, but I can&#8217;t
seem to find any more examples.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Can someone point me in the right direction?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=1 color=blue face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New";color:blue'>typedef</span></font></span></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
<span class=SpellE>itk::RGBToVectorImageAdaptor</span>&lt;RGB8ImageType&gt; <span
class=SpellE>AdaptorType</span>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=1 color=blue face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New";color:blue'>typedef</span></font></span></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
<span class=SpellE>AdaptorType::AccessorType::ExternalType</span><span
style='mso-spacerun:yes'>&nbsp; </span><span class=SpellE>PixelVectorType</span>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=1 color=blue face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New";color:blue'>typedef</span></font></span></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
<span class=SpellE>itk::Image</span>&lt;<span class=SpellE>PixelVectorType</span>&gt;
<span class=SpellE>VectorImageType</span>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>AdaptorType::Pointer</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
adaptor = <span class=SpellE>AdaptorType::<span class=GramE>New</span></span><span
class=GramE>(</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>adaptor</span></font></span><font size=1
face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>-&gt;<span
class=SpellE>SetImage</span>(<span class=SpellE>rgbimage</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'><span
style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><span class=GramE><font size=1 color=blue face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New";color:blue'>typedef</span></font></span></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
<span class=SpellE>itk::VectorIndexSelectionCastImageFilter</span>&lt;<span
class=SpellE>VectorImageType</span>, Grayscale8ImageType&gt; <span
class=SpellE>VectorCastType</span>;<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>VectorCastType::Pointer</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
caster = <span class=SpellE>VectorCastType::<span class=GramE>New</span></span><span
class=GramE>(</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=1 color=green face="Courier New"><span style='font-size:8.0pt;font-family:
"Courier New";color:green'>//caster-&gt;<span class=SpellE><span class=GramE>SetInput</span></span><span
class=GramE>(</span>adaptor);<span style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>//
fails to compile, invalid argument type<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=1 color=green face="Courier New"><span style='font-size:8.0pt;font-family:
"Courier New";color:green'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>VectorImageType::Pointer</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>
<span class=SpellE>vimage</span> = <span class=SpellE>VectorImageType::<span
class=GramE>New</span></span><span class=GramE>(</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>caster</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>-&gt;<span
class=SpellE>SetInput</span>(<span class=SpellE>vimage</span>);<span
style='mso-tab-count:1'>&nbsp; </span><font color=green><span style='color:
green'>// does compile, but of course does nothing</span></font></span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Chris<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>