Tuesday, November 27, 2012

Thumb Hypoplasia App: V0.2.0


I updated my Thumb Hypoplasia app to version 0.2.0 today.  This update brings more optimizations (non-antialiased text, for example) other other tweaks to improve performance.  My goal is to take exactly 10 samples per second on a variety of hardware so that each data point specifies a known point in time.  Also, I added a display of the current trial's ID number next to the test information text.

You can find the source code here.

Thanks for stopping by!

Chris Konstad

Tuesday, November 20, 2012

Thumb Hypoplasia: First Test


I found out today that one of my friends has thumb hypoplasia (diagnosed with Type 1).  Since I had my tablet with a beta build of my thumb hypoplasia app, we decided to try it out and see how well it worked.

I am not a doctor or a medically trained professional.  I am a high school student who loves science and programming.  The following analysis of the data is my interpretation of the data. I have received permission from my friend ("the patient") to post this information here.

The patient told me that he has type 1 thumb hypoplasia in his right hand only.  To run this test, the patient held my Acer A500 (10.1" screen) in both hands in the landscape position.  The full application looks like this:


He swept each thumb, one at a time, across the screen in an arc that started with his thumb parallel to the edge of the screen.



My software recorded his thumb position roughly ten times a second.  The slow sample rate is due to the painting of the "data field" (the area with the grid).  Once I learn how to cache the background pixmap of a QGraphicsScene, then I can increase the performance of this app.  Once he was done with swiping his thumbs across the screen, I saved the data as a *.png and the test was over.

Once home, I started to analyze the data that I had just taken.  I printed it out to the proper size (with each grid box being one square centimeter) and began taking measurements.  


I printed out the data field image (life sized, I checked it with a pair of calipers) and used a pair of calipers and a compass to obtain my measurements.  You can see the calculations overlayed on the data above (Keep in mind that the bezel of the tablet moved the centers of the circles off of the data field.  By printing out the data field image on an 8.5" by 11" piece of paper, I had enough room to the sides to find the center of the circles using a compass.  The area calculations include the area off-screen).  The afflicted thumb (right hand) has 86% of the range of motion (ROM) of the non-afflicted thumb on the plane that we measured on.  

The patient told me during the test that he has a smaller abductor pollicis brevis, which would result in a weaker abduction of the thumb manifested in a smaller angle of abduction from the starting position (aligned with the side of the palm, parallel to the index finger).  The data gathered from this test shows that symptom.  In other words, my app works (so far)!  


My application gathers data at a relatively constant rate that varies by device (because of the screen painting time).  In the future, I hope to make each data point represent the same change in time no matter which device it is used on, but that's lower on my list of priorities at the moment.  What you can see here, though, is how hard the patient had to work to force his thumb to sweep across the screen.  The data points on both thumbs end (at the bottom of the arc) with a much closer grouping than they do at the middle of the arc.  Therefore, one can deduce that the patient was struggling harder at the end of the arc to try to push his thumb as far as it could go.  On the non-afflicted side, the close grouping at the end is only 8mm long.  On the afflicted side, however, it is 13mm long.  The tighter the grouping near the end, the harder the patient was trying to move his thumb.  The data shows us that the patient struggled harder to abduct his afflicted thumb than his non-afflicted thumb, which supports the conclusion of a smaller abductor pollicis brevis. 

The tighter grouping of the data points at the beginning of the arc (at the top) can be explained by a slow velocity as the thumb accelerates during its sweeping motion.  The generally tighter grouping of the afflicted side versus the non-afflicted side can probably be attributed to the fact that the patient did the first test with his afflicted side.  He wasn't familiar with the testing process, so he did not know how fast he could move his thumb.  More tests are needed to confirm these hypotheses.

All of my interpretations are based on a single test with only one trial, which means that the data could be inaccurate.  More testing is needed to see how effective this application will be, but these are definitely promising first results!   One of my goals for this application is to automate the data analysis process.  I also want to optimize how the data field is rendered so that each data point is taken at a known time interval.

Thanks for stopping by!

Chris Konstad

Saturday, November 17, 2012

Thumb Hypoplasia App 2.0


This app will be used to measure a patient's thumb's range of motion on a 2D plane.  By comparing ROMs (range of motion) of before and after surgery, surgeons will be able to get a quantitative analysis of the effects of the surgery.  The first version of this app was designed to find the 3D volume of space that the thumb could move in, but that had some issues.  This new version is working pretty well so far!  Each square on the grid is 1 square centimeter (found by having the user input a diagonal length of the screen and using the resolution to calculate the pixel density).  Each red dot is a recorded touch point.

I've spent about 8 hours this weekend working on this app (so far), because I've decided to rewrite it from scratch.  The main interaction area is a QGraphicsView widget which has perfectly usable performance on my modest Acer A500.  Through this project, I've been learning a lot about graphics in Qt, which should hopefully let me write some cool custom widgets.

Well I'm going to get back to working on the app now.  I'll post a video demo of it to Youtube soon.

Thanks for stopping by!

Chris Konstad

Edit: Here's a YouTube video of the very basic functionality currently implemented in action:

Friday, November 16, 2012

Update: School and College

I've been pretty quiet on my blog lately because school work and college apps have taken up a huge part of my time this past month.  Luckily, I'll be done with college apps before winter break so I can work on some side projects soon.  When I'm not doing educational work (school work, college apps, etc.), I'm working on things for my robotics team and trying to help get a programming club at my school going.  

Our (Jesuit Robotic's) ROV is looking great so far this year.  We have some ideas that we have been tossing around for a year or so that we are finally getting around to implementing!  For example, we are going to have a Raspberry Pi onboard so that we can flash our Arduino firmwares without having to open up the cans (waterproof electronics containers).  

The programming club is coming along nicely.  Two other students and myself are leading the club by teaching the other members how to use Qt to target iOS and Android (sadly, most of our members haven't had any programming experience yet).  Our first project is an application that will act as an information center about all of the clubs on campus.  We are working with the web development club on campus to create a web-based application that will let club administrators update the information about their club to include upcoming events and other notes.  

Here is an awesome Qt Developer Days video demonstrating Qt 5 on various platforms (I can't wait for Qt 5 to come out in 2013!  I'm super excited about Qt Creator 2.6 as well.).


And if you're looking to make 2D games using Qt Quick that target mobile devices, check out V-Play.  I haven't used their service yet but it looks pretty interesting!

Finally, I'm starting to make some headway again on a thumb hypoplasia analyzing Android app.  I've been stuck for a while because of third party library linking (and using) issues, but now a friend of mine offered an alternative solution.  Instead of finding a 3D volume that the thumb can move in, I could instead find the area on different planes that the thumb can move in.  It's much easier to calculate area than it is volume!  I plan to get some work done on that tonight because I'd like to start testing out a beta version of it ASAP.

Thanks for stopping by,

Chris Konstad