I was able to achieve pretty good segmentation of an individual stent using the ConnectedThresholdFilter by placing a seed inside the stent and adjusting the threshold values:
I then save this segmentation out to a format SNAP can use, and import it into SNAP. This is the initial segmentation imported from my program:
I then used this data as the seed for the snake evolution. By setting the 'advection force' parameter pretty high, I was able to keep it from leaking out, but it doesn't grow very far outside the initial segmentation, either.
Part of the problem is slight misregistration, you can see where the blood vessel in the TOF data was versus where it is in the REST data below:
This was the first test of bringing the segmentation into SNAP, so there are a lot of settings I can try to adjust. First off, I'm going to see about adding a couple more seeds in the ConnectedThresholdFilter, so that more of the original blood vessel can be imported into SNAP. Right now testing takes a long time since I'm running all the filters on the whole dataset, I'm going to add the ability to define a region of interest so I can play with the parameters more interactively. I can also try running landmark registration using the stent connections as landmarks, and see if that helps.