Total Pageviews

Sunday, April 15, 2012

Since the last post, I have made quite a bit of progress on writing the current version of the program.  The bone segmentation is complete which was a major milestone for triradiate air since it represents a completed stage 1 analysis.  Stage 2 is the individual bone segmentation and organ level segmentation.  The individual bone segmentation has been taken to a reasonable first pass stopping point and I am working on getting the small vessel tracking algorithms completed.
I have to say that there are very few algorithms that I write where the result vastly exceeds expectations to the point that only minimal modification is required.  The current version of the small vessel tracking is a significant departure from the SVT code that went into previous versions of the software.  Specifically, I have essentially abandoned the modified region growth algorithms all together.  The new algorithm is very similar to the iliac tracking algorithm in that it does not explicitly provide a direction for the vessel tracking to progress in, but rather it makes multiple attempts with varying starting points using the longest mean free path to guide it. 
At any rate, there is another major development in the ongoing Saga of Triradiate Industries.  The first server running an alpha build of the software has been installed at a major academic center and is being ported into the existing PACS system.  Hopefully over the next couple of months, we will get feedback and be able to modify the code base based on a more robust testing data set.  In the mean time, hopefully I can get the rest of the organ level segmentation completed.

Thursday, February 23, 2012

At long last, I finally completed the iliac tracking algorithm about 2 weeks ago and have since moved on to updating the bone segmentation algorithm.  As you might expect, with the vascular segmentation out of the way, the bone segmentation proceeds much more smoothly than before.  In fact, when you couple the bone tracking algorithm with the anatomic data that was obtained in the aorto-iliac tracking, the overall process goes much more smoothly.
One problem that has arisen is that the VT algorithm doesn't include the internal iliacs since they are of no real significance and are variably patent.  Well, part of the problem with loosening the bone tracking criteria is that now in approximately 10% of scans, the internal iliacs are included in the initial bone segmentation.  Whether or not this turns out to be an actual issue or simply a nuisance that can be dealt with later is still to be determined.
At this point, the sub-segmentation of the ribs and spine is complete which leaves just the bony pelvis and femurs to go.  Interestingly, the previous versions of the software sub-segmented only the pelvis and femurs and relied primarily on anatomic models and the anatomic match points extracted from the wire-frame analysis.
I don't think this pre-production version of the software will make any use of anatomic models since I find them difficult to work with and time consuming to properly fit.
Well, the next step is the sacral segmentation and then I will do the femurs and finally the iliacs.  Looks like things are going much more smoothly than in previous versions of the software... mostly because I have learned to avoid some of the simple mistakes that used to consume hours of debugging time.

Monday, January 23, 2012

Well, it turns out that if you have an algorithm which works tremendously well for 98% of cases that it comes across, the remaining 2% of cases are inevitably a collection of the most bizarre input data that you can imagine.  The algorithm I am talking about is the iliac tracking which I essentially completed near the end of December.  For the past couple of weeks, I have been trying to find ways to solve the problems that arise with specific scans.  There are a couple of general categories of scans which cause problems.
The first is the setting of very low contrast in the vessel.  These are not as big of a problem as you might think.  In fact, the algorithm does a fairly good job of successfully tracking the vessels as long as there is some amount of contrast present.
The second problematic class of cases is when there are endovascular stents in place.  Again, this is not as much of an issue as you might think with the cases that I am working with.  At some point I will have to go back and write some dedicated code for analyzing the stents, but for now the salvage algorithms seem to pick up the pieces fairly well.
The last major class of scans is the surgical aorta where there is something like an aortobifem graft.  Those graft tend to arise almost perpendicular to the abdominal aorta where they are sewn on.  It is that abrupt change in direction that has caused the largest number of problems for my algorithm.  Some amount of smoothness to the vessel course and curvature is implicit in the ways that my tracking algorithms function.  At this point I am forced to allow the algorithm to complete tracking whatever vessel it has managed to track and now we go back and analyze the results and find where the rest of the tracking should start.  As you can imagine, this is nether a philosophically satisfying or technically simple task.  Fortunately, this give me a chance to fine tune my skills at probing vessels for small branches since one of the next steps is going to be isolating the visceral artery ostia.
Well, enough talk... time to get some coding done.

Thursday, January 05, 2012

So, I have been continuing to work on the salvage algorithm for the iliac tracking.  There is a particularly perplexing situation where one iliac tracks properly and the other fails.  The question arises as to how exactly to identify a better starting point for the failed iliac artery.  Basically, all I have to work with is a list of point which are highly likely to be either in the aorta or common iliac arteries.  The algorithm prior to this stage has done a lot of statistical sorting of the points to whittle them down to the highest yield points.  At any rate, for the salvage algorithm, I realized that all of the previous analysis was not necessarily applicable in this case because you essentially can take very little for granted.  I messed around with a bunch of very complicated and convoluted logic steps to try to isolate a good alternate starting point.
It turns out that after all that work, I was still getting very unreliable results.  The fundamental issue being that I don't have the ability to write a hunk of code that, from a logic standpoint, can account for the myriad of possible configuration that arise in nature.  As I thought about the problem on a more abstract level, I started to conceptualize the problem as one of bipolar attraction and repulsion.  if a potential point is very close to the string of point that represent the successful iliac artery, then that point is very unlikely to represent a good starting point.  This of course is exactly the calculation for the potential relative to a line of charge.  So, I did exactly that... I treated each point of the opposite iliac artery as a point charge and calculated the field for each of the potential points.  The assumption being that the point furthest from the line of charge will have the lowest potential and also have the highest change of being a successful starting point.
It took a couple of days of debugging to get the algorithm to do what it is supposed to do, but at the end of the day, I finally got it to give a correct result on the test case.  Unfortunately, for these special cases, there are only a handful of studies that end up using this portion of the algorithm which makes robustness testing very difficult.  At the very least I will be able to try it out on the 4 or so other case I have that run into similar issues.