I know I haven't posted an entry in an extremely long time, so I am going to write a couple of long entries that sum up what I've been doing at the lab.
Week 3: Scripting
Last I posted, I explained what spiros script does, the work he is doing, and what I did on the script. During the rest of the week, I worked a lot more on scripting. There was a small problem with the script where any voxel with a value of zero (which was most of them) turned gray and made the image extremely hard to read. It was a simple fix, but it took forever to figure out!
On FSL there is an awesome tool called "atlases" (I may have already talked about them?) With an atlas, you can take any normalized brain image, click on any spot on the image, and the atlas will tell you what part of the brain you are looking at. While working on the node script, I thought it would be a really cool feature if there was an atlas for the nodes, so I started to look into how to make an atlas. Unfortunately, there are no online resources for creating atlases in fsl, and the users manual for the atlas tool has a note on the bottom that says: HINTS AND TIPS FOR ATLAS DEVELOPERS. And then the page ends. So, because I had not much better to do, I found where the atlas info was stored on the computer, and tried to figure out how to write one. A basic atlas consists of two files: a reference image and a data file. The reference image is a standard fsl file(.nii.gz) but the data file is written in XML, which I don't know and have basically no use for. So instead of learning xml, I just copied and pasted the contents of one file and filled in the blanks for my atlas. The way that the file works, is that on each line there are the x, y, and z coordinates of the brain area and then a title. The file then finds the coordinates on the reference image and determines how large the brain area is based on intensity values. Once I figured all this out, I was under the impression that I would have to manually open each of the 369 node images and define the center of each node for the data file. I tried that for about 8 images, and then decided that there must be an easier way. I came in the next day, and pieced together a few scripts that could find image centers to make an "atlas creator" script. I paired the atlas creator with the node script, and 20 minutes later (running the script took FOREVER) I had a personalized atlas that showed all of the nodes! The last step was to create an installer package that would create the necessary files and move them to their correct locations.
The next thing Spiro asked me to do was to see if I could somehow show the connection on each node, or make a 3D representation of the nodes and connections. I tried, but didn't get very far. One of the programs involved learning the C programming language, which I did over the weekend. However, when I got back to the lab on Monday, I decided I wanted to design my own study.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment