Hi again,<div><br></div><div>Ok, I've verified that using:</div><div><br></div><div><span class="Apple-style-span" style="font-size: 14px; background-color: rgb(255, 255, 255); "><table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr><td><font face="arial, helvetica, sans-serif">itk::VotingBinaryIterativeHoleFillingImageFilter</font></td></tr></tbody></table></span></div><div><br></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; background-color: rgb(255, 255, 255); ">works by viewing the output in paraview. The holes I didn't want disappeared, the filter cleaned the segmented for me.<br>
<br>My current problem is now vtk is suddenly not showing the output of the above filter fro some reason.<br>First I segment with confidence connected and then I feed the output of confidence connected into the hole filling filter and when I go to see the output, its just a black screen. Partial code below, I have a display function elsewhere making using of the connector, the image type is constant throughout (signed short and 2D):<br>
<br><span class="Apple-style-span" style="font-family: arial; "><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>if(inSegmentedWindow) {</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>////get relevant data from previous segmentation</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>//confidenceConnected->SetInput( confidenceConnected->GetOutput() );</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>HoleFillingFilterType::Pointer fillingFilter = HoleFillingFilterType::New();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>ImageTypeSS2::SizeType indexRadius;</div><div> </div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>indexRadius[0] = 2; // radius along x</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>indexRadius[1] = 2; // radius along y</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetRadius( indexRadius );</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetBackgroundValue( 0 );</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetForegroundValue( 255 );</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetMajorityThreshold( 2 );</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetMaximumNumberOfIterations( 20 );</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>fillingFilter->SetInput( confidenceConnected->GetOutput() );</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>connector->SetInput(fillingFilter->GetOutput());</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">        </span>}</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>else {</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->ClearSeeds();</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>//gather relevant data from reader</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->SetInput( reader->GetOutput() );</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>inSegmentedWindow = true;</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>//define compulsory threshold parameters for region-growing filter, the lower the multiplier the more similarities are needed in region</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->SetMultiplier( 1.0 );</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->SetNumberOfIterations( 4 );</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->SetReplaceValue(255);</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>confidenceConnected->SetInitialNeighborhoodRadius( 4 );</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>//add the seeds that were chosen</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>ImageTypeSS2::IndexType index;</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>for(seedsItr = seeds.begin(); seedsItr != seeds.end(); ++seedsItr) {</div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span>index[0] = (*seedsItr).second.x;</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                        </span>index[1] = (*seedsItr).second.y;</div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span>confidenceConnected->AddSeed( index );</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">                </span>}//end for</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>connector->SetInput(confidenceConnected->GetOutput());</div>
<div><span class="Apple-tab-span" style="white-space: pre; ">        </span>}</div></span><br>Please help, this is my last problem if I can overcome it.<br><br>Thanks,<br>John</span></div><div><span class="Apple-style-span" style="font-size: 14px; background-color: rgb(255, 255, 255); "><table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr><td><font face="arial, helvetica, sans-serif"> <br><br><br></font></td></tr></tbody></table></span><br></div>