Wednesday, July 23, 2008

First paper... psyche!

So I keep wanting to write about the first paper that I was going to publish, but apparently there's some shenanigans still pending. Yes, that's right, what I wrote turns out to have potential legal issues associated with it-- which is odd, considering the triviality of the solution in the paper. Until the _second_ paper comes out (advisor, I'm looking at you...), this blog will continue to be about useless, trivial things. Which is what most blogs are about anyway, so it's not like I'm not in good company.

First up: Maha batteries. These batteries are the best, bar none, thanks for playing, see ya later. I've had some duracell rechargeables, and those damn things, even though they're rated for 2650 mAh, last about five minutes in my sb800 flash. The maha's, though, those things last for a good couple of hours, even on repeat mode, and I only need one set of 5 batteries (the flash has a fifth battery for fast recycle times) to last for most of a wedding. If you want batteries to go with your digital camera, look no further. Plus, my charger was making odd crackling noises, so I called up Maha tech support. They shipped me a new charger, which arrived the next business day (last Monday), for free, and it works like a charm. How's that for customer service? They have a customer for life, if they keep this up.

Second up: how much fat in dairy products? (How's that for a random topic...) If you look at the conventional wisdom, you can eat low fat (or no-fat) dairy products, and still get your vitamins and minerals. That same website states that we get most of our vitamin D from the sun. As a programmer, I go in the sun only when forced; for me, then, I need to get it from food. Vitamins are only absorbed in fats, according to the physiology text I've been studying and teaching out of for a few years now. The upshot? You need fat in your diet to absorb vitamins. It's that simple-- an entirely fat-free diet will mean that your body will have no mechanism for absorbing (some) vitamins in your gut, and that can mean certain anemias crop up, bone problems, etc etc. So while everyone's all worried about not eating fat, make sure that you're still eating fat with your milk and yogurt, otherwise a lot of the good it can do you disappears. Some of you know why I'm harping on this, some of you don't, and since there's only about two people who are reading this, I think you already know why I'd care so much about nutrition at the moment.

Tuesday, June 17, 2008

Wii Fit, Day 15 (wherein I bitch about OsiriX)

Whoo! Second day below BMI 25-- down to 24.75! And my Wii Fit age, whatever that's worth, is now down to 29. Given that I felt like refried ass when I got home to do this, those numbers are saying something. I'm not sure what they're saying ("Be tired when you work out! That way, the board will think you're doing well!" or "When you're awake, your mind is working so much your body twitches and lowers your ability to balance. Stop thinking, and you'll be younger!"), but hey, it was a nice shot in the arm after a very long day.

Another great part was when it told me that Melodie was spending too much time asleep, and I should wake her up. Not only is the Wii Fit harassing me if I traipse above the 25 BMI mark, but now it wants me to harass my wife as well. Good job, Nintendo!

But really, I spent the morning fixing my car and (re)writing a physics lab report. OsiriX is a program used to view DICOM on the Mac. It's free, but it's got some serious usability problems, and those problems cost me quite a bit of time. First, it converts PET values to SUV values by default. SUV stands for, really, Silly Useless Value-- it's an attempt to calibrate the activity in a location by the amount that should be expected in that area given your probe. So if you're imaging, say, radioactive oxygen, then the lungs should be bright, and if they're not (or rather, where they're not) you've got a blockage in the lungs, and you now know where the blockage is so you can go and remove it. That last bit of information is important; before PET, you could know something was wrong with the lungs, but not necessarily pinpoint it. What was frustrating about OsiriX assigning PET values automatically was that the lab involved imaging a phantom, not any actual tissue, so there really is no baseline expectation from which to draw any conclusions, so the numbers that were being reported for pixel values were all wrong, and I had to rewrite big chunks of it.

The other problem with OsiriX is that it's truly Volume of Interest (VOI) retarded. The region of interest capability of the software is entirely based off of planar selections, and it is impossible (at least from what I could do) to save all of the regions of interest for a 3D PET image. Sure, there were menu options to do so, but none of them worked, so I ended up doing a lot of the VOI stuff by hand, which was a pain. And I really didn't want to do a volume rendering in order to get statistics under the VOI, and the volume rendering capability was all but useless, and wrong to boot. It could not render a simply cylinder, as it kept putting holes in the side.

The program may be useful for a simple viewer and simple DICOM database, but anything more complicated seems to be beyond its reach, or so much of a pain that you'd spend the majority of your time wrestling with the program rather than getting answers you need.

The major problem is that the people who're writing the program have a very crufty attitude towards 3D volumetric data-- they think it's just a bunch of 2D images layered on top of each other. That view is a convenience of the old hack of storing volumes of data as 2D images, and in the age of a modern computer which can handle more than a megabyte of memory at a time, should be banished from any realistic imaging software. I'll say it again: imaging software that thinks of 3D images as 2D slices is WRONG. 2D slices may be a convenience for viewing data on a film, if that's your poison (and I'm not a radiologist, maybe there's some reason beyond "we've always done it this way" for the 2D slice viewing of 3D medical data), but when you're using a computer screen, you should take advantage of modern graphics hardware and treat the data as truly volumetric.

Any software that wants to do so should:
1) Store all data as single blocks of data. There are no separate planes in a 3D data set. I repeat, there are no single TIFF or DICOM planes in a 3D data set, so never save them as such. There is only one block of data, or, if you're backprojecting, the original data itself.
2) Visualize only in 3D. Viewing on axis should be just moving a clipping plane through a 3D dataset, and any axis should be selectable for this treatment, not just the z axis (which is what is normally done now). Hell, if I want my axis to be 45 degrees off from x, y, and z, and I want to step through the data a plane at a time like that, that is extremely simply to do mathematically and provides the user with much more freedom from arbitrary constraints. Anatomic data is not aligned to a grid, and treating it as such may prevent the visualization of useful objects.
3) Use VOI's as entirely 3D datasets as well. Since there are no 2D planes, there are no 2D ROI's either, but 3D VOI's. I should be able to mark regions on my clipping plane, or place a sphere, or use a segmentation threshold (directly on the data, or on some derivative data, like the laplacian) to gather regions. If I want to be particularly snazzy, segmentation routines like Luminita's or Achi's should start to become standard. None of this restriction of drawing VOIs as the sum of ROIs, except as the simplest case. This VOI data should be a full 3D data block, just like my underlying data.

Done with bitching. To work!

Sunday, June 15, 2008

Wii Fit, days 13 and 14

Took a break for a few days, mainly because I was being lazy. So, on Saturday, I started at 11:30 in the evening. I tried to get started at 8:30 in the morning, but nearly fell asleep during the sun salutations. Anyway, I found out that if you use the Wii Fit over midnight, it will reset your timer, no matter what you were doing. Seems like it might be useful to have the it consider a workout to be a solid block, rather than interrupting for a silly little thing like midnight. But then again, maybe the cheerful wii fit board just has to reset by then anyway.

Today, I did the boxing game twice, which is just fantastic. I'm liking the advanced version a lot-- after all the pushups and so forth, I worked out the (shoulder) kinks. Down to a BMI of 24.81, and also hiked for a couple of hours up to Griffith Park Observatory, but only about 26 minutes on the Fit. Wii Fit Age: 36, still old, I guess.

Wednesday, June 11, 2008

Wii Fit, Day 10 (or, I'm Weak)

Just... Couldn't... Do ... It ... Today

I biked to and from school, which is apparently the same as 1 hour and 20 minutes, according to the Fit.

I did do my body test-- down 0.7 pounds, but still just above a BMI of 25. My age is now a whopping 34, up from 30 yesterday. Ah well.

But tomorrow is a new day!

Tuesday, June 10, 2008

Wii Fit, Day 9

Today was a good day. Studied for my final tomorrow, prepared for an image assessment trial (ie, got a protocol ready), and other such work things. Halfway through the day, Serena showed up, and the three of us hiked in Malibu Canyon for two hours. A fairly amorous couple decided to... er... get amorous in the crater lake there (we walked up, and she was in the water naked, and the guy was himself about to go in, but stopped just as we walked up. I guess that's the risk of sex in a public park, even on a Tuesday afternoon).

On the way home, we had to -- it was like a magnet pulling iron fillings, we had no choice-- dine at Father's Office. It is the tastiness, and the Wii chastised me for imbibing too much ("You've gained 0.7 pounds! Good Lord, son, are you trying to crush me?" I made that second sentence up, but not the first), but sometimes, life must be lived. Today was a yoga/strength day, starting with deep breathing, half moon, dance pose, bridge, shoulder stand, and sun salutations, and then moving on to pushups (2x20), jackknifes (1x30), triceps (1x20), and plank (30 secs). I really need to work on my pushup form; I may lower the number, just to make sure I don't blow the form into uselessness.

Then, I watched Melodie do the meditation balance game, and she destroyed it. 180 seconds, sitting perfectly still. I was amazed. I tried to replicate the feat. I failed. She came in at one point, when I'd gotten to 130 seconds, and I lost it. She told me, when I asked (peevishly, I'll admit), that all I had to do was to think of nothing-- which is much, much harder than it sounds. So I failed a few more times. And then I remembered reading in Eat, Pray, Love (a book about a very self absorbed rich person who trots around the globe after destroying the life of her soon-to-be ex-husband because she can't figure out how to go on a spiritual journey with another person) what she was told when she had a similar problem, and I paraphrase: "It is a shame that no one else has had this problem before you." That phrase really clicked; I started to think about that, while in the balance game, and voila-- 180 seconds.

Monday, June 9, 2008

Wii Fit, Day 8

Note to self: don't eat dinner and then try to do the Fit. It will just tell you that you are a fatass, and that your lack of discipline has set your goal back by months.

Melodie and I went for a bike ride for a good hour, hour and a half, to Beverly Hills today, and when we got back, I was so starving that I ate pretty much everything I could get my hands on. I guess the biking is really upping my metabolism-- but the Fit was kind enough to point out that my weight had now recrossed the magical BMI of 25, and asked me to choose which of the lapses in mental discipline had led to my downfall. Overeating, I suppose? I guess I'm not supposed to eat, or I have to eat during a specific timeframe? Or maybe I'm just grumpy that the damn thing would suggest that a weight fluctuation of a pound and a half is a huge amount, requiring an excuse-- and then go ahead and tell me that a fluctuation within 2 pounds is normal, from day to day. Nice.

Also, my Wii Fit age was 54, and then I redid the test, and it was 34. Hrm. I wonder if there's any rhyme or reason to how that gets calculated.

So, feeling grumpy at the thing and that the biking up Santa Monica Blvd was enough for the day, I stopped after 10 minutes of balance exercises. Tomorrow: more strength training, as well as studying for a final.

Sunday, June 8, 2008

Wii Fit, Day Seven

For once, I thought I'd actually write up what I had done on the day that I had done it.

Today is a momentous day (sort of)-- I finally managed to get my BMI below 25, now down to 24.93, and was rewarded with a thumbs up from my Mii.  Yay!  I've unlocked all but the last strength and aerobic exercise, and now just have to unlock the longer-running exercises (how many jackknifes can one do?  I'm up to 30 reps, but maybe it goes to 100?).  My Wii Fit Age is now 41, I think, up from the 36 I had yesterday when so bloated with tasty naan.  I wonder whether that age thing has any bearing on reality...

I went for arms and abs today.  A brief Yogic warmup (breathing, half moon, sun salutation, chair, bridge), and then on to strength exercises (6 pushups/side planks, 6 torso twists, 30 jackknifes, back to 10 pushups/side planks, 30 more jackknifes, 20 triceps with a five pound weight).  My arms feel like noodles.

And then aerobics, doing the boxing game twice.  I really like the boxing game; the final ten seconds are very satisfying-- breaking 300 on the second time around was pretty excellent, even if the gruff coach guy told me I was holding back.  I found that to really get the punches going, gotta put more acceleration, and a longer range.  Finally, I cooled down with a 1x advanced step routine.  All in all, it felt pretty good.

Here's the thing.  I'm thinking that my earlier complaints about the soccer game and so forth don't really hold water.  Now that I've gotten a much better grasp of what I need to do there, I'll get pretty good scores, and a high of 144.  It's true that I shouldn't be moving my head much, but still, I can accomplish a lot by balance shifting, and that's what shows up on the screen.  Melodie's pointed out to me that, since I'm much taller than she is, when I try to balance, it seems like the Wii Fit is interpreting my balancing movements as being far more oscillatory than hers.  I'd assume that the board is calibrated (ie, if someone's 6'3", then when their head moves, the radius of that movement with respect to the ground is longer than if someone who's 5'9" moves), but assumptions make an ass out of you and umption.  Maybe that's why I can get away with just balance shifts in the soccer game, rather than moving my head, like I'm 'supposed to'-- the board isn't calibrated for the movements of a larger person.  Who knows?

Another game I've been playing: Death Jr.  This game is purely awesome, and reminds me that there are just straight up fun games out there to play.  Some of the jumping puzzles are frustrating, though-- I just finished the level which ends with Experiment #51 (or whatever it's called), and those puzzles represented the first frustrating parts of the game.  Earlier, if I died, I could see that I was being retarded; but these times, I just felt frustrated, because there was some wacky timing thing I had to get down to get across (it's the room with the tank, for those of you who've played it).  I wonder how it'd stack up, as a game, when you're playing with someone who isn't a gamer, and might not be keen on that kind of frustration?

In other news-- about to finish up the quarter.  Just have to finish a final Biomedical Physics lab, and take a test in... another class I won't write about yet, and then I'm done!  Off to work at iCRCo for the summer, where I hope that my image processing knowledge can be put to good use.  Of course, such things remain unpublishable until they are published-- but general knowledge will be revealed, if I have any.

Wii Fit, Day 6

Well, it happened-- my weight went up a bit, back over the overweight marker. It was probably the huge Indian meal I had-- ah, Saag Paneer, who can resist your delicate spinachy ways? I felt bloated all evening, after eating about a quarter of what I could have eaten ten years ago. I guess I'm really getting old; after ten minutes of aerobics, I could feel the meal making a return up the passage from which it had been deposited, so decided that that was enough for now.

Saturday, June 7, 2008

Wii Fit, Day 5.

A good day, I think. I got a second controller, a second nunchuck, a copy of Raving Rabbids, and a copy of Death Jr, just in case I feel like actually playing a game with the thing. Brief reviews: Rabbids is cute and fun, and Death Jr. is a cute and fun copy of zelda, with a kids death vibe to it.

As for the Fit! It told me that, for the first time, I'd dipped below BMI 25, and was now normal! Yay! Of course, me getting my hair cut (finally) probably has nothing to do with the sudden weight loss (only a pound, but apparently enough). I've unlocked all the balance exercises (what the hell is with the meditation exercise?), all but two strength exercises, four or five yoga exercises, and one aerobic exercise.

I watched Melodie do the aerobic thing yesterday, and she had similar problems to me, where the board would occaisionally not find her feet, or registered her feet touching the board as a kick, or vice versa. I guess I should just relax, rather than hope the thing will be accurate.

Friday, June 6, 2008

Wii Fit, Day Four

Wii Fit, Day Four.  Today, my goal was to figure out the aerobics portion of the Fit.  I focused almost exclusively on the Hula-Hoop (R)(!) exercise, doing it some 8 times before stopping.  I actually used it more than that, because I was so miserable at swinging my hips the way that the Wii wanted me to, I'd restart once the hoop dropped to the ground.  By the 8th time, I'd managed to figure out how to get the additional hoops that are thrown at you (despite what the Mii on the screen does, just lean left, not forward and left) and how to move my hips (ignore the 'big circles' hint given by the game; the way to get 250+ spins is to move your stomach in tight circles).  I also worked up a very large amount of sweat.

The other aerobic game I did was the step game, and once I unlocked it, advanced step.  These games are fun, but apparently have a very hard time registering my giant feet (or something).  I always thought I had pretty good rhythm, but the Wii disagrees, and who am I to argue?  Several times, however (and Melodie is my witness!) I'd put my foot on or off the board, and the game wouldn't register it.  Weird.

I'm liking the Yoga now for warmups, and I really wish I could combine the positions.  For instance, I'm used to a sun salutation being a combination of what the Fit calls Sun Salutation Start--Plank--Down Dog-- Up Cobra-- Down Dog-- Jump feet forward to finish Sun Salutation.  The Fit's version of the Sun Salutation leaves out those intermediate steps, and is basically a glorified version of touching your toes.  Why is that a problem?  Because I'm starting to feel a bit unbalance.  I'm definitely working more in one direction than another; if I do 40 jackknifes, say, there should be a stretch to the opposite direction, so that the spine can unwind.  

Penguin game-- very frustrating at first, but eventually I figured it out.  I can get between 50 and 80 points pretty consistently, depending on whether or not I can grab the red fish.  The TightRope game I've also more or less gotten-- it really just requires steadiness, and doesn't particularly care which foot you life to walk forward with.  By the time my Mii finishes, it's almost always putting the opposite foot forward than what I'm walking with.

Total workout time: 1 hr.  Wii Fit Age: 37.  Weight: 202, BMI 25.09.
(I did the body test after working out, and had apparently lost enough to make my age 32 and my weight 200, with a BMI of 24.something.  It was gratifying to see my Mii lose weight).

[As a side note, I am still working on that PhD-- and hopefully, soon, I'll have something to show for it.  But until it's published, I ain't sayin' squat.]

Thursday, June 5, 2008

Day three on the Wii Fit

It's Day Three on the Wii Fit, and I've finally figured out how to do pushups on this thing when you're taller than the average. Basically, grab the sides, rather than place your hands flat on it. That way, when you go lower, your hands are below your shoulders, rather than inside of them (which is basically the same thing as doing triangle pushups, which I can't do). Once I figured that out, the pushup/plank exercise became a lot easier.

I also added in my bike riding to the fitness log (20 minutes to school and back, 40 minutes total, which the Wii Fit considers 'heavy exercise' and doubles), so I think I'm unlocking things pretty quickly. By this point, I've already unlocked most of the exercises (certainly more than half) and have most of the strength exercises on later reps (30 for jackknife, 10 for pushup, 20 for the single leg twist, etc).

Total time spent: 34 minutes. Weight: up a bit to 202 (I had to enter in a reason why I got fatter by 1.1 pounds; definitely a shame tactic there-- there's no brushing it off as 'daily fluctuation'), and Wii Fit age is down to 37.

Wednesday, June 4, 2008

Day Two on the Wii Fit

Yesterday was Day Two on the Wii Fit. I didn't get as much time to mess around with it (37 minutes, but much less time on exposition), because a professor sent out an email saying that the final grade would be determined by labs, and that there would be no final. Since I was not even close to finishing said labs, I didn't spend much time exploring new stuff on the Fit.

I did do some of the aerobic games yesterday, and Melodie did the running one. What was interesting with the running game was that Melodie's a runner, and she knows how to do it right. When she ran the first time like she would normally run, the game told her that she wasn't burning enough calories and that she was clearly a novice exerciser. The second time she did it, she just did the twist rather than run (basically), and got a much higher score. The tip she got from a coach once was that she was 'running like a washing machine', meaning that she kept twisting her torso when she ran, which expended energy uselessly-- that energy wasn't spent going forward, just side to side. It appears that the Wii wants that same useless expenditure of energy-- which is OK, from the perspective of burning calories, but not OK, in that the form of the runner will definitely deteriorate if that strategy is adopted.

Me, I only run when chased, and so those three minutes were very tiring.

37 minutes on, 1.3 pounds lost (probably just daily fluctuation).

Tuesday, June 3, 2008

An older blog...

I used to maintain this blog here:

http://processedimage.blogspot.com

but have since completely forgotten my username, password, etc.

So, to make sure that the information there isn't completely forgotten, I repost it.

Why? Because that's the most straightforward code, with examples, that I've found for running a multigrid solution to the poisson equation. Or, for that matter, the most complete explanation I've seen of multigrid, period-- so, I repost, on the hopes that it may help some poor engineering student who's lost in a world of badly explained math.

Got a Wii Fit!

Been a while since I wrote something.  A lot's changed in the intervening 8 months, but unfortunately, not a lot I can write about.  However, after being chastized by a friend for being so lousy with the blog, I thought I'd give it a quick update.

First, a few new photos!  
My friends Kariann and Alina got married, and chose me to be their photographer, which was awesome.  We went to Mammoth Mountain a few weekends ago, where Serena and Josh got engaged.  I didn't shoot shots of them doing that (Melodie did, actually, but that's another story), but I did get some of the countryside, shown here, and some of us can be found here.


But the real thing I wanted to write about was the new Wii Fit that I got from my parents as a pre-birthday present.

In short, the Wii Fit is pretty awesome.  Construction wise, it feels pretty sturdy and present, despite being made entirely of plastic, in a way I haven't come to expect from consumer electronics.   I suppose being able to support the weight of a 200 pound guy reasonably would require that it be sturdy.

One nitpick-- Wii wireless networking doesn't support encryption, at least from what I can tell, which is just plain irresponsible on Nintendo's part.  That was the only unexpectedly irritating thing I noticed during setting this system up, that I'll need to get a wired LAN adapter.

The Fit itself is pretty fun to use.  I went through the incredibly ... blunt setup process, which informed me that I was a fat bastard (6'2.5", rounded to 6'3", 203 pounds) who clearly had never gotten off of the couch in his life.  I could defend myself here-- I do have a black belt (though I haven't trained in three months), I bike to school, etc, etc, but better, I suppose, to let the tiny Japanese make judgements on my apparently enormous Caucasian frame and just get it over with.  Besides, I have a secret weapon-- I've been letting my hair grow long, and once I cut it, I'll probably drop a pound.  Hah!  How's that for manipulating the scales?

My first day on the Wii after that was interesting.  My balance isn't all that it could be (or once was, I suppose), which the thing let me know by telling me my age was 44, coupled with a picture of my Mii as an old man, holding his back.  I started with some Yoga poses, which was very interesting, and scored from 1 to 100 based on how wobbly you are.  Two of the three poses I'd never done before: Half-Moon and Tree.  For those poses, I earned about 35 to 50 points, as my balance was way off.  Half-Moon was particularly interesting, because as I started to do it, muscles I hadn't stretched in a long while started to scream in protest.  Already off to a good start, stretching things I'd forgotten I had.  Warrior pose was incredibly easy, so much so that I wonder if the board was misconfigured or something-- it was the only time my balance never moved, and I got a score of 99.  I've been doing that pose for some eight years now, so it might also have been experience.

Then, on to strength training.  This part was more interesting.  I'd never been able to satisfactorily do a pushup, and the Wii's introductory push-up regimen includes planking (a different plant than what I was used to, in that I was used to resting on my elbows, not my hands).  Plus, my shoulders are a bit broad for the thing; my hands needed to rest on the very edges of the board, so someone much bigger than me might have serious issues doing that part of the workout.  My strength results varied from "couch potato" (1 star) to "bodybuilder" (4 stars), depending on whether I worked my legs (strong from the kicking) or my arms (weak like a t-rex).  One very frustrating exercise was the backwards row-- I just could not get the balance right for that exercise.  Apparently, you have to be back on your heels while you do it?  Regardless, the Wii stated that I hadn't done any reps by the time I was done, which was frustrating, since I was doing them as demonstrated.  The second time around, I figured that by standing on the back edge of the board, I could get the full number of reps, but that seems like cheating to me.

Speaking of being back on your heels as a balance position, that's generally a bad place to be, sparring-wise.  I haven't really sparred in a year or so, so that's about as weak an excuse as I can get, but it felt entirely unnatural to move my balance into such a weak position.  The other thing that's a bad idea to do is just to move your head, rather than move your entire body, when dodging things.  So, when it came time to do the soccer balance game, I sucked at it, because I was used to moving my entire body out of the way, and not leading with my head.  Either I need to empty the cup (a la Zen and the Martial Arts) or I need to avoid that particular exercise.  For now, after trying multiple times and getting my score to 55, I'm got to avoid.

But I had a load of fun with the ski jump game (got 256 yards after my third try!) and was really challenged by the balls-rolling-into-holes game (90 points on the first try!).

I avoided aerobics, because I hate aerobics-- but I guess I'll have to stop avoiding them at some point, if I want to unlock all the games.

Overall, on this first day, I did 36 minutes of actual exercising, and an hour and 20 minutes all told (due to watching demos of the exercises, etc).

I'm psyched to keep this up.