I should start off by saying that this technique is of no real practical value, because this process is far more time-consuming than simply just manually trimming trees to meet your specifications. That said, it's an awful lot of fun to play with!
This takes advantage of the fact that when trees grow, they literally grow around anything in their path, often even passing right through blocks in their way without harming them.
So let's start with a sapling. This poor, innocent sapling will soon be bent to our will!
Now I should introduce you to the sapling's best friend: bone meal. Bone meal is made from the bones that skeletons drop, or is alternately found in your Creative menu.
When you hold bone meal in your hand and right-click, it acts like a super-duper-instantaneous fertilizer, making anything grow to full size immediately. Coincidentally, it's also a lot of fun to play with.
So, thusly armed with sapling and bone meal, here's what you do. You make a container for your tree-to-be.
Then keep building a container. Leave yourself a two-block tall hole so that you can still get to your sapling.
I recommend making your mold two blocks wide, which makes it less likely that any stray branches will pop out. I also suggest leaving a hole at the top, but it isn't strictly necessary in my experience.
Once your mold is as tall as you want it, you can poke holes in it where you'd like the tree to appear. In the picture below, you can see that I've poked some odd holes in my mold.
Then walk around to your entryway and use the bone meal on your tree. You may have to click it a bunch of times, for some reason. I don't know if it's just server lag or what, but for some reason I had to click a bunch of times (or just hold the right mouse button down).
Then voilà! There's a tree inside your mold!
Unless you make your mold really high, it's likely that some tree bits will extend out the top.
Now remove the mold, and you're left with a bizarre tree that's grown into whatever shape you made!
Like I said, it's a time-consuming method that isn't at all useful, but there's something ridiculously fun about growing trees inside of buildings. Give it a try!
If you have a better technique, or ideas for how to make even more interesting trees, let us know!