I have a binary vtkImageData class and I want to do 2 things with it, and I don&#39;t know how.<div><br></div><div>1.  I want to remove all islands from the image except one.  I want to identify the island not to be removed by a pixel location.  I have seen vtkImageIslandRemoval2D, and I don&#39;t think that&#39;ll work for me, because I do not know anything about the island&#39;s size that I want to keep (it could be big, small, or in the middle), all that I know is one point which is guaranteed to be interior to one island, and that&#39;s the island I want to keep.</div>
<div><br></div><div>2.  I want to do hole filling on the output of step 1 and I don&#39;t know how to do that.  I saw vtkFillHolesFilter but that appears only to work on poly data.  I&#39;d like something analogous to that for vtkImageData.</div>
<div><br></div><div>If anyone knows how to do these things, I&#39;d appreciate it.  Also, if it matters, I&#39;m coding in Java.</div><div><br></div><div>Thanks</div>