<div><br></div>Hi Luis,<div><br></div><div>It seems that "C" is the case, but my pipeline runs only once. Here is a skeleton of my code, the relevant parts are shown.</div><div><br></div><div>Test.cxx:</div><div>
<br></div><div> // the readers are properly set, the images are valid</div><div><br></div><div><div> typedef itk::SkeletonFilter<InputImageType> FilterType;</div><div> FilterType::Pointer filter = FilterType::New();</div>
<div> filter->SetImage1( imageReader1->GetOutput() );</div><div> filter->SetImage2( imageReader2->GetOutput() );</div><div> filter->SetImage3( imageReader3->GetOutput() );</div><div> filter->Update();</div>
<div><br></div><div>SkeletonFilter.h:</div><div><br></div><div> // SkeletonFilter is derived from ImageToImageFilter. </div><div><br></div><div><div>public:</div><div><br></div><div> /** Input image type. */</div><div> typedef typename Superclass::InputImageType<span class="Apple-tab-span" style="white-space:pre">                </span> InputImageType;</div>
<div> typedef typename Superclass::InputImagePointer<span class="Apple-tab-span" style="white-space:pre">        </span> InputImagePointer;</div><div> typedef typename Superclass::InputImageConstPointer InputImageConstPointer;</div>
<div><br></div><div> /** Set the first image. */</div><div> void SetImage1( const InputImageType * fImage )</div><div> { this->SetInput( 0, fImage ); }</div><div><br></div><div> /** Set the second image. */</div><div>
void SetImage2( const InputImageType * sImage )</div><div> { this->SetInput( 1, sImage ); }</div><div><br></div><div> /** Set the third image. */</div><div> void SetImage3( const InputImageType * tImage )</div><div>
{ this->SetInput( 2, tImage ); }</div><div><br></div><div>protected:</div><div> SkeletonFilter();</div><div> virtual ~SkeletonFilter() {};</div><div><br></div><div> /** This method starts the process. */</div><div>
void GenerateData();</div><div><br></div><div>};</div></div><div><br></div><div><br></div><div>SkeletonFilter.txx:</div><div><br></div><div>// constructor</div><div><div>template<class TImageType></div><div>SkeletonFilter<TImageType></div>
<div>::SkeletonFilter()</div><div>{</div><div> this->SetNumberOfRequiredInputs(3);</div><div>}</div></div><div><br></div><div><div>template<class TImageType></div><div>void </div><div>SkeletonFilter<TImageType></div>
<div>::GenerateData()</div><div>{</div><div><br></div><div> InputImageConstPointer image1 = this->GetInput(0);</div><div> InputImageConstPointer image2 = this->GetInput(1);</div><div> InputImageConstPointer image3 = this->GetInput(2);</div>
<div><br></div><div> if( !image1 )</div><div> {</div><div> itkExceptionMacro( << "image1 was not set" );</div><div> }</div><div> if( !image2 )</div><div> {</div><div> itkExceptionMacro( << "image2 was not set" );</div>
<div> }</div><div> if( !image3 )</div><div> {</div><div> itkExceptionMacro( << "image3 was not set" );</div><div> }</div><div>}</div></div><div><br></div><div><br></div><div><br></div><div>So, where should I apply UpdateLargestPossibleRegion() or another solution is required in this case?</div>
<div><br></div>Cheers,<br>-- <br>Zoli<br>
</div>