<div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,</SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN> </div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am writing a composite filter based amongst others on the CompositeFilterExample, the CannyEdgeDetectionImageFilter.cxx (which is based </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">On 3 other filters) and several more filters which I havent written yet. </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I sucessfuly used the example CompositeFilterExample to convert CannyEdgeDetectionImageFilter to a composite <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY:
Arial">filter in which the sequential filtering operation is done in the GenerateData() methood. Even though the filtering operation works well, </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a problem understanding the pipeline operation in the CompositeFilterExample class. The constructor sets up a pipeline as follows:<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">template <class TImageType><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CompositeIrisRecognitionFilter<TImageType><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE:
10pt; FONT-FAMILY: Arial">::CompositeIrisRecognitionFilter()<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_CastToRealFilter = CastToRealFilter::New();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_CannyFilter = CannyFilter::New();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_RescaleFilter = RescaleFilter::New();<SPAN
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>// Set up the pipeline, this is MY code based exactly on CompositeFilterExample<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_CannyFilter->SetInput( m_CastToRealFilter->GetOutput() );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun:
yes"> </SPAN>// Set the variance for the Gaussian smoothing filter<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_CannyFilter->SetVariance(m_GaussianVariance);<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_RescaleFilter->SetInput( m_CannyFilter->GetOutput() );<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></div> <div
class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-tab-count: 1"> </SPAN><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>//<SPAN style="mso-spacerun: yes"> </SPAN>Default variance for the canny edge detector, tested on <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>//<SPAN style="mso-spacerun: yes"> </SPAN>the UPOL iris image database<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes"> </SPAN>m_GaussianVariance=50.0;<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And the GenerateData() methood executes the pipeline as folows: <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">template <class TImageType><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY:
Arial">void<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CompositeIrisRecognitionFilter<TImageType>::<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">GenerateData()<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">{<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>//<SPAN style="mso-spacerun: yes"> </SPAN>The output of an edge filter is 0 or 1<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN
style="mso-spacerun: yes"> </SPAN>m_RescaleFilter->SetOutputMinimum(<SPAN style="mso-spacerun: yes"> </SPAN>0 );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_RescaleFilter->SetOutputMaximum( 255 );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>// Run the pipeline<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">
</SPAN>m_CastToRealFilter->SetInput( this->GetInput() );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_RescaleFilter->GraftOutput( this->GetOutput() );<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>m_RescaleFilter->Update();<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN>this->GraftOutput( m_RescaleFilter->GetOutput() );<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-tab-count:
3"> </SPAN><o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">}<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">My questions are: <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">1-why are the pipeline set up and pipeline executions placed in two different methods? I placed both in the GenerateData methood </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">And as expected it was still working. Is there an architectual advantage to the
seperation of </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">operations? I think it adds confusion and breaks the logic sequential order of operations<o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">2-How does GraftOutput work exactly, why do I have to use it twice in this case? <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">3-is the invocation of the methood this->GetInput() equivalent to reader->GetOutput() in a non </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Composite filter (e.g one that does everything in the main methhod)? <o:p></o:p></SPAN></div> <div class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman';
mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Thank you very much for your help,</SPAN></div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"></SPAN> </div> <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Shlomo.</SPAN></div><p> 
                <hr size=1>Do you Yahoo!?<br>
Get on board. <a href="http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/handraisers">You're invited</a> to try the new Yahoo! Mail Beta.