<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32147528</id><updated>2012-01-18T09:50:56.189-08:00</updated><title type='text'>Brain MRI Segmentation Research Project</title><subtitle type='html'>A log of the work I am doing at the UC Davis School Of Medicine, Neurology Department in Professor Carmichael's Lab on Brain Image Processing. Specifically, the implementation of software related to the process of Registering Images along with its visualization.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32147528.post-9082831979235489828</id><published>2007-09-17T11:25:00.000-07:00</published><updated>2007-09-17T11:47:58.148-07:00</updated><title type='text'>Gradient Descent Optimization</title><content type='html'>&lt;div style="text-align: justify;"&gt;To help with the optimization of the segmentation using the itk::WaveletTransform I implemented a basic itk::WaveletGradientDescentOptimizer that takes into account each intensity profile separately. It gets from the itk::IntensityProfileMetric information about the gradient for each intensity profile around the shape or mesh being registered, then it creates using that information a new mesh based on those gradients and a step value. This new mesh is then approximated using wavelets by calling methods in the itk::WaveletTransform.&lt;br /&gt;&lt;br /&gt;To test the new optimizer I tried tracing the brain with a tracing that has more detail than the ellipse model but less detail than the previous one I discussed. The following images shows information about the tracing that I used.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Ru7Lb0ZQ4ZI/AAAAAAAAAJo/kIkOuaIkO2o/s1600-h/newtrace.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Ru7Lb0ZQ4ZI/AAAAAAAAAJo/kIkOuaIkO2o/s400/newtrace.JPG" alt="" id="BLOGGER_PHOTO_ID_5111246305893605778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru7LTUZQ4YI/AAAAAAAAAJg/XSbC6ok83Co/s1600-h/iguinewtrace.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru7LTUZQ4YI/AAAAAAAAAJg/XSbC6ok83Co/s400/iguinewtrace.JPG" alt="" id="BLOGGER_PHOTO_ID_5111246159864717698" border="0" /&gt;&lt;/a&gt;Then I ran the optimizer using the optimal parameters that I found from the tracing and the following movie shows the results. The movie illustrates how the fit on the right side of the brain is closer then with just the ellipse but on the left the coefficients seem to be standing still, which may be due to some bugs in the optimizer that I have to iron out.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-713e67b5646076c9" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v1.nonxt6.googlevideo.com/videoplayback?id%3D713e67b5646076c9%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330362385%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D2349CB4A65B0C79BB5843115CBCF3BDFC31F1328.64BE302DFEDD5B9B9169441BF22151A7A02D7790%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D713e67b5646076c9%26offsetms%3D5000%26itag%3Dw160%26sigh%3DUFUVAIGR-OiiYjTe9_vt3UpQBUU&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v1.nonxt6.googlevideo.com/videoplayback?id%3D713e67b5646076c9%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330362385%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D2349CB4A65B0C79BB5843115CBCF3BDFC31F1328.64BE302DFEDD5B9B9169441BF22151A7A02D7790%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D713e67b5646076c9%26offsetms%3D5000%26itag%3Dw160%26sigh%3DUFUVAIGR-OiiYjTe9_vt3UpQBUU&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-9082831979235489828?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=713e67b5646076c9&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/9082831979235489828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=9082831979235489828' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9082831979235489828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9082831979235489828'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/09/gradient-descent-optimization.html' title='Gradient Descent Optimization'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_U6dfB5RKuSU/Ru7Lb0ZQ4ZI/AAAAAAAAAJo/kIkOuaIkO2o/s72-c/newtrace.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4944510018558396683</id><published>2007-09-16T16:31:00.000-07:00</published><updated>2007-09-16T16:40:34.086-07:00</updated><title type='text'>IGUI With Fit</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following shows a still of the intensity profile GUI with the intensity profile selected fitted to using the algorithm that finds the location of the brain skull interface. In the graph showing the intensity profile the title also contains information on where the location of the brain skull interface is located. This can be used to explore different methods to fit the intensity profiles like seeing how the length of the intensity profile should be changed or what types of landmarks to look for around the areas that the intensity profile is sampled from.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2-okZQ4XI/AAAAAAAAAJY/XfmslGUGkEw/s1600-h/igui.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2-okZQ4XI/AAAAAAAAAJY/XfmslGUGkEw/s400/igui.JPG" alt="" id="BLOGGER_PHOTO_ID_5110950756309066098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4944510018558396683?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4944510018558396683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4944510018558396683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4944510018558396683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4944510018558396683'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/09/igui-with-fit.html' title='IGUI With Fit'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2-okZQ4XI/AAAAAAAAAJY/XfmslGUGkEw/s72-c/igui.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-1423338375980486689</id><published>2007-09-16T12:58:00.000-07:00</published><updated>2007-09-16T16:18:42.156-07:00</updated><title type='text'>Optimization</title><content type='html'>&lt;div style="text-align: justify;"&gt;The main purpose of incorporating the itk::WaveletTransform into the segmentation framework is to create deformable registration where the points can fit the outside of the brain with more detail. Some issues  with the  addition of the  itk::WaveletTransform were that it had difficulty being optimized using the itk::OnePlusOneEvolutionaryOptimizer so a few parameters were looked at to make sure that it would work with an optimizer like gradient descent or downhill simplex optimizer. The following graphs represent the metric value of the segmentation as one wavelet parameter is being changed. The graphs also show a diagram of the brain with a region circled in green representing the area that the wavelet parameter is affecting.&lt;br /&gt;&lt;br /&gt;For the most part the coefficients have an overall minimum point in the metric value but still has places where the coefficients can get stuck. One way to incorporate gradient descent as the optimizer would be to take the gradient information at each intensity profile and then use that information to find the next set of wavelet coefficients.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2zSkZQ4UI/AAAAAAAAAJA/kmX16TP3ch8/s1600-h/oneparam1combine.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2zSkZQ4UI/AAAAAAAAAJA/kmX16TP3ch8/s400/oneparam1combine.JPG" alt="" id="BLOGGER_PHOTO_ID_5110938283724038466" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Ru2zTEZQ4VI/AAAAAAAAAJI/IWa8rv9obd8/s1600-h/oneparam2combine.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Ru2zTEZQ4VI/AAAAAAAAAJI/IWa8rv9obd8/s400/oneparam2combine.JPG" alt="" id="BLOGGER_PHOTO_ID_5110938292313973074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2zTkZQ4WI/AAAAAAAAAJQ/MXHFHgTyDaU/s1600-h/oneparam3combine.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2zTkZQ4WI/AAAAAAAAAJQ/MXHFHgTyDaU/s400/oneparam3combine.JPG" alt="" id="BLOGGER_PHOTO_ID_5110938300903907682" border="0" /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-1423338375980486689?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/1423338375980486689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=1423338375980486689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1423338375980486689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1423338375980486689'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/09/optimization.html' title='Optimization'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/Ru2zSkZQ4UI/AAAAAAAAAJA/kmX16TP3ch8/s72-c/oneparam1combine.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4031498831031587982</id><published>2007-09-09T22:11:00.000-07:00</published><updated>2007-09-09T23:12:55.637-07:00</updated><title type='text'>Wavelet Transform For Deformable Registration</title><content type='html'>&lt;div style="text-align: justify;"&gt;I finished working on the itk::WaveletTransform and now have it working with the itk::OnePlusOneEvolutionaryOptimizer it uses the Daubechies wavelets now and is able to do the wavelet transformation much faster. The following video shows the registration moving along using a transform with 128 parameters and 1200 points. Parts of the border of the ellipse can be seen to change their location as the coefficients of the wavelets are changed. Video also &lt;a href="http://www.youtube.com/watch?v=ONMkvNuoOnE"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;object width="320" height="280" class="BLOG_video_class" id="BLOG_video-bc29a9510f951c35" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v10.nonxt3.googlevideo.com/videoplayback?id%3Dbc29a9510f951c35%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330362385%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D4BD03C7E0498714B6CE1DC533F8D747A588EB7E1.15A86AE72A77EBB8179A001D90711D8AF123B64D%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dbc29a9510f951c35%26offsetms%3D5000%26itag%3Dw160%26sigh%3DlSiAkcX1yWh_FchbB8ehaGkdg9E&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="280" bgcolor="#FFFFFF"flashvars="flvurl=http://v10.nonxt3.googlevideo.com/videoplayback?id%3Dbc29a9510f951c35%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330362385%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D4BD03C7E0498714B6CE1DC533F8D747A588EB7E1.15A86AE72A77EBB8179A001D90711D8AF123B64D%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dbc29a9510f951c35%26offsetms%3D5000%26itag%3Dw160%26sigh%3DlSiAkcX1yWh_FchbB8ehaGkdg9E&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;/div&gt;This registration was created by using parameters that were found by using a tracing of the border of the skull using MultiTrace. The tracing was inputted into the IGUI program to get the intensity profile data to fit and find optimal parameters. A picture of the IGUI program with the tracing mesh follows.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/RuTVDmzzYBI/AAAAAAAAAIw/nCuFLeR5_xc/s1600-h/brainshapedmesh.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/RuTVDmzzYBI/AAAAAAAAAIw/nCuFLeR5_xc/s400/brainshapedmesh.jpg" alt="" id="BLOGGER_PHOTO_ID_5108442135279132690" border="0" /&gt;&lt;/a&gt;This is the data that is used to fit the data in the preceding video. Although one consequence of using this exact data is that the models used to fit the intensity profiles may not work anymore since many of the intensity profiles are not normal to the skull anymore. To remedy this models that change the length of the sampling interval may need to be developed and ones that take into account a smaller neighborhood of data and one with more ambiguities. Another improvement would be to change the optimizer to factor in the information from gradient descent, which the itk::IntensityProfileMetric is still calculating. The optimizer would need to be changed to make sure that the there were localized gradient directions calculated or to treat each wavelet function as a seperate and independent optimization problem. Because of the problems with the current optimization methodology the registration depicted in the video seems to stay still and have a hard time finding the correct exact positioning although if run long enough it would probably converge to the correct answer.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4031498831031587982?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4031498831031587982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4031498831031587982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4031498831031587982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4031498831031587982'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/09/wavelet-transform-for-deformable.html' title='Wavelet Transform For Deformable Registration'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_U6dfB5RKuSU/RuTVDmzzYBI/AAAAAAAAAIw/nCuFLeR5_xc/s72-c/brainshapedmesh.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-8862518950901148866</id><published>2007-09-05T00:44:00.000-07:00</published><updated>2007-09-09T22:57:50.102-07:00</updated><title type='text'>Daubechies Wavelet For Brain Tracing</title><content type='html'>&lt;div style="text-align: justify;"&gt;To test how intricate of a shape the wavelet transform of the brain-skull interface could be, I first started by tracing the edge using MultiTracer. Through that program I was able to export by traced points unto a UCF file so that I could work with the points directly. The following shows the brain slice I used with red outlining where I traced, followed by a plot of just the points I traced in red.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RuTcu2zzYCI/AAAAAAAAAI4/VOXEI8_VRKA/s1600-h/tracingslice.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RuTcu2zzYCI/AAAAAAAAAI4/VOXEI8_VRKA/s400/tracingslice.jpg" alt="" id="BLOGGER_PHOTO_ID_5108450574889869346" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rt5gw2zzX8I/AAAAAAAAAII/7dO80x-tluU/s1600-h/brainbefore.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rt5gw2zzX8I/AAAAAAAAAII/7dO80x-tluU/s400/brainbefore.JPG" alt="" id="BLOGGER_PHOTO_ID_5106625419947499458" border="0" /&gt;&lt;/a&gt;Once the tracing had been found separated the x and y points in the data to be modeled separately and also resampled them so that the total number would be a power of two to help fit in with the level framework in multiresolution analysis. Thus I had a total of 2^13 points. At first I tried to use the Cubic B-spline wavelets that I had tried before to model the ellipses but ran into a few problems. Once the function or in this case the data to be modeled became very intricate and complex the linear system I needed to solve became more troublesome to work with and the pseudo inverse I was using would not suffice to solve the system. To remedy this I tried to make the number of wavelets I had match the number of samples I was using to discretize the wavelets in hopes to make a square matrix that would easily be invertible. But the algorithm that I was using was using huge matrix operations and was thus taking too long to get to levels that would allow for the amount of detail that I needed.&lt;br /&gt;&lt;br /&gt;I decided to try using the Daubechies Wavelets since they seemed to be good for encoding polynomials. There also were algorithms created that took advantage of the fast wavelet transform that would enable me to avoid inverting the matrix and instead just calculate the coefficients at a high level and then filter them to lower levels, which proved to be much more efficient. The following graphs demonstrate my results. The first one is the tracing in green modeled by wavelets in red using level j=5 with 2^6 coefficients.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rt5kPWzzX9I/AAAAAAAAAIQ/qLktXLRy6ps/s1600-h/waveletbrainj%3D5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rt5kPWzzX9I/AAAAAAAAAIQ/qLktXLRy6ps/s400/waveletbrainj%3D5.JPG" alt="" id="BLOGGER_PHOTO_ID_5106629242468392914" border="0" /&gt;&lt;/a&gt;These next images represent the data in green modeled by the wavelets in red at levels j=8 and j=9 with 2^9 and 2^10 coefficients respectively. As the level increases the level of detail that the wavelet transform is able to capture also increases.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rt5k9GzzX-I/AAAAAAAAAIY/xLbjLKZuOL0/s1600-h/waveletbrainj%3D8.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rt5k9GzzX-I/AAAAAAAAAIY/xLbjLKZuOL0/s400/waveletbrainj%3D8.JPG" alt="" id="BLOGGER_PHOTO_ID_5106630028447408098" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rt5lC2zzX_I/AAAAAAAAAIg/mXnlTPpsNWU/s1600-h/waveletbrainj%3D9.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rt5lC2zzX_I/AAAAAAAAAIg/mXnlTPpsNWU/s400/waveletbrainj%3D9.JPG" alt="" id="BLOGGER_PHOTO_ID_5106630127231655922" border="0" /&gt;&lt;/a&gt;The following image represents level j=9 where I used only half the wavelets and the results show that the wavelet model of the data shown in green only covers half of the data. This demonstrated the ability to zero in on certain locations using the wavelets.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rt5lwWzzYAI/AAAAAAAAAIo/-DeXHf7dNN0/s1600-h/waveletbrainj%3D9selected.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rt5lwWzzYAI/AAAAAAAAAIo/-DeXHf7dNN0/s400/waveletbrainj%3D9selected.JPG" alt="" id="BLOGGER_PHOTO_ID_5106630908915703810" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-8862518950901148866?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/8862518950901148866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=8862518950901148866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8862518950901148866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8862518950901148866'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/09/daubechies-wavelet-for-brain-tracing.html' title='Daubechies Wavelet For Brain Tracing'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/RuTcu2zzYCI/AAAAAAAAAI4/VOXEI8_VRKA/s72-c/tracingslice.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-288460686151390211</id><published>2007-08-24T16:19:00.000-07:00</published><updated>2007-08-24T16:23:28.146-07:00</updated><title type='text'>ITK Issues</title><content type='html'>&lt;div style="text-align: justify;"&gt;I was having problems getting the coefficients from Linux early since the coefficients I was calculating seemed to be way off from the answers that they should have been. Initially the problem seemed to stem from Linux having problems with inverting the wavelet matrix when solving the linear system for the coefficients. But after installing the latest version of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;ITK&lt;/span&gt; on the Linux box I found that all of the previous problems disappeared and the coefficients I was getting were fine.&lt;br /&gt;&lt;br /&gt;Since the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ITK&lt;/span&gt; version I was using on the Linux boxes was so old it was probably causing problems in the registration program. There were also other cases when I was getting segmentation faults when using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;intens&lt;/span&gt;_process class that could have been partly caused by the outdated libraries in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ITK&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;VTK&lt;/span&gt;, and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;CMake&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-288460686151390211?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/288460686151390211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=288460686151390211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/288460686151390211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/288460686151390211'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/itk-issues.html' title='ITK Issues'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4898109576416059949</id><published>2007-08-24T16:01:00.000-07:00</published><updated>2007-08-24T16:19:22.972-07:00</updated><title type='text'>Additional Wavelet Levels With The Ellipse</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following show the elliptical points in green with tangential noise added from negative ten to positive ten pixels with a uniform distribution. The graphs start with j = 0, and go up to j = 0,...6, with the wavelet points shown in red.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKGzzX0I/AAAAAAAAAHI/eUCIHDwCQ1E/s1600-h/xypointstnoise0-1level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKGzzX0I/AAAAAAAAAHI/eUCIHDwCQ1E/s200/xypointstnoise0-1level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407027623419714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKGzzX1I/AAAAAAAAAHQ/g1rlAVDLcgw/s1600-h/xypointstnoise0-2level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKGzzX1I/AAAAAAAAAHQ/g1rlAVDLcgw/s200/xypointstnoise0-2level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407027623419730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKWzzX2I/AAAAAAAAAHY/DHxRQico7HU/s1600-h/xypointstnoise0-3level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKWzzX2I/AAAAAAAAAHY/DHxRQico7HU/s200/xypointstnoise0-3level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407031918387042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKWzzX3I/AAAAAAAAAHg/0PLPojcP92s/s1600-h/xypointstnoise0-4level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKWzzX3I/AAAAAAAAAHg/0PLPojcP92s/s200/xypointstnoise0-4level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407031918387058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKmzzX4I/AAAAAAAAAHo/E74UNYCWtTE/s1600-h/xypointstnoise0-5level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKmzzX4I/AAAAAAAAAHo/E74UNYCWtTE/s200/xypointstnoise0-5level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407036213354370" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs9kTmzzX5I/AAAAAAAAAHw/hOZ_vN_EZbc/s1600-h/xypointstnoise0-6level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs9kTmzzX5I/AAAAAAAAAHw/hOZ_vN_EZbc/s200/xypointstnoise0-6level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407190832177042" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs9kT2zzX6I/AAAAAAAAAH4/oiXuHJ7FxDg/s1600-h/xypointstnoise0-7level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs9kT2zzX6I/AAAAAAAAAH4/oiXuHJ7FxDg/s200/xypointstnoise0-7level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102407195127144354" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4898109576416059949?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4898109576416059949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4898109576416059949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4898109576416059949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4898109576416059949'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/additional-wavelet-levels-with-ellipse.html' title='Additional Wavelet Levels With The Ellipse'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs9kKGzzX0I/AAAAAAAAAHI/eUCIHDwCQ1E/s72-c/xypointstnoise0-1level.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-8078614766384806274</id><published>2007-08-24T11:36:00.000-07:00</published><updated>2007-08-24T11:45:51.449-07:00</updated><title type='text'>More Wavelet Levels With The Ellipse</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following is a series of images that represent the graphs of the elliptical data in green modeled by wavelets in red of varying degrees of resolution added. The first images starts with j = 0, and the last is j = 0,...6.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8l2GzzXsI/AAAAAAAAAGI/BFzEI839lrU/s1600-h/xypointsnoise0level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8l2GzzXsI/AAAAAAAAAGI/BFzEI839lrU/s200/xypointsnoise0level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102338514305113794" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs8l2WzzXtI/AAAAAAAAAGQ/-L-Hz7XIjcU/s1600-h/xypointsnoise0-1level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs8l2WzzXtI/AAAAAAAAAGQ/-L-Hz7XIjcU/s200/xypointsnoise0-1level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102338518600081106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8l22zzXuI/AAAAAAAAAGY/K8Zy9QLRULA/s1600-h/xypointsnoise0-2level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8l22zzXuI/AAAAAAAAAGY/K8Zy9QLRULA/s200/xypointsnoise0-2level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102338527190015714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8l22zzXvI/AAAAAAAAAGg/lwZRk5qhcWY/s1600-h/xypointsnoise0-3level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8l22zzXvI/AAAAAAAAAGg/lwZRk5qhcWY/s200/xypointsnoise0-3level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102338527190015730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8l3GzzXwI/AAAAAAAAAGo/lC2BmoDUMZc/s1600-h/xypointsnoise0-4level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8l3GzzXwI/AAAAAAAAAGo/lC2BmoDUMZc/s200/xypointsnoise0-4level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102338531484983042" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs8nLWzzXzI/AAAAAAAAAHA/Dz9ml7-VsSo/s1600-h/xypointsnoise0-5level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rs8nLWzzXzI/AAAAAAAAAHA/Dz9ml7-VsSo/s200/xypointsnoise0-5level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102339978888961842" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8m42zzXyI/AAAAAAAAAG4/0xIK3yGx8oM/s1600-h/xypointsnoise0-6level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8m42zzXyI/AAAAAAAAAG4/0xIK3yGx8oM/s200/xypointsnoise0-6level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102339661061381922" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-8078614766384806274?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/8078614766384806274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=8078614766384806274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8078614766384806274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8078614766384806274'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/more-wavelet-levels-with-ellipse.html' title='More Wavelet Levels With The Ellipse'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8l2GzzXsI/AAAAAAAAAGI/BFzEI839lrU/s72-c/xypointsnoise0level.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-6514197562787353452</id><published>2007-08-24T11:07:00.000-07:00</published><updated>2007-08-24T11:26:10.174-07:00</updated><title type='text'>Wavelet Levels With The Ellipse</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following graphs show the same effects of changing the levels as the previous post. These are different in that instead of using just the x points, the whole ellipse is used. The first graph is of the ellipse in green modeled by the wavelets in red using all of the j = 0,...6, levels of resolution. Following that graph is one using just the j = 0, level of resolution and finally one where the higher resolution wavelets are filtered so that they only use ones on one side of the interval.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs8iYmzzXpI/AAAAAAAAAFw/o7Vvctkcgks/s1600-h/xypointsnoise0-6level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs8iYmzzXpI/AAAAAAAAAFw/o7Vvctkcgks/s400/xypointsnoise0-6level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102334708964089490" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8iZGzzXrI/AAAAAAAAAGA/JbcVcPNnKSI/s1600-h/xypointsnoise0level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rs8iZGzzXrI/AAAAAAAAAGA/JbcVcPNnKSI/s400/xypointsnoise0level.JPG" alt="" id="BLOGGER_PHOTO_ID_5102334717554024114" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8iY2zzXqI/AAAAAAAAAF4/Qbv3MUsN7Sw/s1600-h/xypointsnoise0-6levelright.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rs8iY2zzXqI/AAAAAAAAAF4/Qbv3MUsN7Sw/s400/xypointsnoise0-6levelright.JPG" alt="" id="BLOGGER_PHOTO_ID_5102334713259056802" border="0" /&gt;&lt;/a&gt;Another issue is still that finding the coefficients of the wavelets has proved difficult when running the wavelet program on Linux. The problem stems from the inversion of a a matrix to calculate all of the coefficients. The matrix in question is 131x512 with a rank of 131, that I convert to a 512x512 matrix by adding zeros. In windows when it inverts the matrix it probably finds the pseudo matrix so I tried the same thing in Linux by using the vnl_svd&lt;t&gt;::pinverse&lt;unsigned int="" rank=""&gt;. However, the results from using the pseudo inverse were the sae as before and Linux might have tried to use the pseudo inverse instead of trying to do the regular one when I called vnl_matrix_inverse(). Another method available was vnl_svd&lt;t&gt;::solve(vnl_vector&lt;t&gt; const&amp;amp; y) to solve a linear system, although use of this just caused a segmentation fault. To remedy the problem now I am going to finish an iterative method that uses the inner product of the point data and the wavelet functions to create the appropriate coefficients.&lt;/t&gt;&lt;/t&gt;&lt;/unsigned&gt;&lt;/t&gt;&lt;br /&gt;&lt;t&gt;&lt;unsigned int="" rank=""&gt;&lt;t&gt;&lt;t&gt;&lt;/t&gt;&lt;/t&gt;&lt;/unsigned&gt;&lt;/t&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-6514197562787353452?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/6514197562787353452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=6514197562787353452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6514197562787353452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6514197562787353452'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/wavelet-levels-with-ellipse.html' title='Wavelet Levels With The Ellipse'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/Rs8iYmzzXpI/AAAAAAAAAFw/o7Vvctkcgks/s72-c/xypointsnoise0-6level.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-3691406803303497336</id><published>2007-08-22T10:54:00.000-07:00</published><updated>2007-08-22T11:25:51.383-07:00</updated><title type='text'>Wavelet Levels</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following image shows the x points used in the ellipse with noise added and evenly spaced intervals in green with the wavelet fit shown in red that contains all the levels j = 0,...6. Following that image is the same display except this time the wavelet fit only contains level j = 0. As it can be seen the higher levels add greater detail at a smaller scale, while the lower levels give the overall shape of the curve.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx6Z2zzXmI/AAAAAAAAAFY/H8uxQJAiEus/s1600-h/xpointsnoise0-6level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx6Z2zzXmI/AAAAAAAAAFY/H8uxQJAiEus/s400/xpointsnoise0-6level.JPG" alt="" id="BLOGGER_PHOTO_ID_5101587062532038242" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rsx6aGzzXnI/AAAAAAAAAFg/DBaPsseqxFE/s1600-h/xpointsnoise0level.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rsx6aGzzXnI/AAAAAAAAAFg/DBaPsseqxFE/s400/xpointsnoise0level.JPG" alt="" id="BLOGGER_PHOTO_ID_5101587066827005554" border="0" /&gt;&lt;/a&gt;The following is the same graph as above except that wavelets of the higher levels are filtered so that only the ones that effect the right part of the function are used and thus as can be seen only the right side has the finer detail.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx_j2zzXoI/AAAAAAAAAFo/8CqnjkjfvxQ/s1600-h/xypointsnoise0-6levelright.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx_j2zzXoI/AAAAAAAAAFo/8CqnjkjfvxQ/s400/xypointsnoise0-6levelright.JPG" alt="" id="BLOGGER_PHOTO_ID_5101592731888868994" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-3691406803303497336?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/3691406803303497336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=3691406803303497336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/3691406803303497336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/3691406803303497336'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/wavelet-levels.html' title='Wavelet Levels'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx6Z2zzXmI/AAAAAAAAAFY/H8uxQJAiEus/s72-c/xpointsnoise0-6level.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-6235495040099571963</id><published>2007-08-22T10:39:00.000-07:00</published><updated>2007-08-22T10:53:42.151-07:00</updated><title type='text'>Representing The Ellipse Using Wavelets</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following images show the ellipse projected onto the wavelets and then projected back to see how they compare to the data. The graph shows the data in red and the wavelet version in green, and as can be seen the data and wavelets show almost the exact same locations. The first graph is the ellipse points, the second the x points, and the third the y points.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rsx1rWzzXgI/AAAAAAAAAEo/4TXoF8wZaRI/s1600-h/xypoints.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rsx1rWzzXgI/AAAAAAAAAEo/4TXoF8wZaRI/s400/xypoints.JPG" alt="" id="BLOGGER_PHOTO_ID_5101581865621609986" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rsx1xGzzXiI/AAAAAAAAAE4/5aysLXBpXLQ/s1600-h/ypoints.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rsx1xGzzXiI/AAAAAAAAAE4/5aysLXBpXLQ/s400/ypoints.JPG" alt="" id="BLOGGER_PHOTO_ID_5101581964405857826" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rsx1umzzXhI/AAAAAAAAAEw/Q53uZzGGX3U/s1600-h/xpoints.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rsx1umzzXhI/AAAAAAAAAEw/Q53uZzGGX3U/s400/xpoints.JPG" alt="" id="BLOGGER_PHOTO_ID_5101581921456184850" border="0" /&gt;&lt;/a&gt;One issue that came up was that the calculations on the wavelets came up with incorrect results when I used the program on a Linux machine. The code implements classes from the VNL library like vnl/algo/vnl_matrix_inverse and vnl/vnl_matrix to complete the computations. When run on a Linux machine the results showed that the wavelets version of the data were off at the edges and when I tried to transform the y points, it gave totally incorrect results like as follows with the data in green and the wavelet fit in red.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx342zzXjI/AAAAAAAAAFA/-z1xOH3JZtI/s1600-h/ypointsbad.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rsx342zzXjI/AAAAAAAAAFA/-z1xOH3JZtI/s400/ypointsbad.JPG" alt="" id="BLOGGER_PHOTO_ID_5101584296573099570" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-6235495040099571963?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/6235495040099571963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=6235495040099571963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6235495040099571963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6235495040099571963'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/representing-ellipse-using-wavelets.html' title='Representing The Ellipse Using Wavelets'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/Rsx1rWzzXgI/AAAAAAAAAEo/4TXoF8wZaRI/s72-c/xypoints.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4292237521929336876</id><published>2007-08-21T13:00:00.001-07:00</published><updated>2007-08-21T13:55:09.506-07:00</updated><title type='text'>Cubic B-Spline Wavelets</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RstErWzzXfI/AAAAAAAAAEg/Rquy0vS2kcY/s1600-h/wavelets.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RstErWzzXfI/AAAAAAAAAEg/Rquy0vS2kcY/s400/wavelets.jpg" alt="" id="BLOGGER_PHOTO_ID_5101246514575138290" border="0" /&gt;&lt;/a&gt;The above is a graph of a few of the wavelets that are being used in the levels j = 0,...,2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4292237521929336876?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4292237521929336876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4292237521929336876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4292237521929336876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4292237521929336876'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/blog-post.html' title='Cubic B-Spline Wavelets'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/RstErWzzXfI/AAAAAAAAAEg/Rquy0vS2kcY/s72-c/wavelets.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4147143969903281740</id><published>2007-08-21T12:03:00.000-07:00</published><updated>2007-08-21T13:55:33.782-07:00</updated><title type='text'>Point Representation Using Wavelets</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rss4PWzzXaI/AAAAAAAAAD4/VIoEAqKuJo0/s1600-h/ellipsepointscropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/Rss4PWzzXaI/AAAAAAAAAD4/VIoEAqKuJo0/s400/ellipsepointscropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5101232839399267746" border="0" /&gt;&lt;/a&gt;The above graph represents all the points currently used at the start of the registration process. The points create an elliptical shape. To transform the points using wavelets, the x and y values were separated as shown in the following graphs.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rss482zzXcI/AAAAAAAAAEI/NAXuX-kyCdU/s1600-h/xpointscropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rss482zzXcI/AAAAAAAAAEI/NAXuX-kyCdU/s400/xpointscropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5101233621083315650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rss5G2zzXdI/AAAAAAAAAEQ/b24OwYrlEsY/s1600-h/ypointscropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/Rss5G2zzXdI/AAAAAAAAAEQ/b24OwYrlEsY/s400/ypointscropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5101233792882007506" border="0" /&gt;&lt;/a&gt;Then Cubic B-Spline wavelets are created with j = 0,...,6, where j is the number of intervals. Scaling functions for j = 0 where also created. Then the scaling functions and wavelets were all put into a matrix by evaluating the function along the interval at 512 points for each wavelet or scaling function and storing those values along the rows. Then that matrix was multiplied by the actual function needing to be transformed, in this case the x or y values that made up 512 points, the result was a vector of coefficients that could be used to recreate the data by multiplying the scaling and wavelet matrix by the coefficient vector. The following graphs illustrate the results where the one on the left represents the x points and the one on the right represents the projection that resulted from the data being projected onto the wavelets.&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rss9SmzzXeI/AAAAAAAAAEY/hjRg93nT_5Y/s1600-h/xwavecompare.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/Rss9SmzzXeI/AAAAAAAAAEY/hjRg93nT_5Y/s400/xwavecompare.jpg" alt="" id="BLOGGER_PHOTO_ID_5101238392791981538" border="0" /&gt;&lt;/a&gt;The wavelet projection produces a set of points with a similar overall shape but the y axis is more then doubled in magnitude. This might be occurring because the wavelets need to be scaled.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4147143969903281740?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4147143969903281740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4147143969903281740' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4147143969903281740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4147143969903281740'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/point-representation-using-wavelets.html' title='Point Representation Using Wavelets'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/Rss4PWzzXaI/AAAAAAAAAD4/VIoEAqKuJo0/s72-c/ellipsepointscropped.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4112016372659876860</id><published>2007-08-15T13:27:00.000-07:00</published><updated>2007-08-17T11:01:22.366-07:00</updated><title type='text'>Intensity Profile Fitting Error</title><content type='html'>&lt;div style="text-align: justify;"&gt;When fitting the intensity profile data a Gaussian and logistic function are used. To begin with the data is quickly looked at to get the initial values of the parameters. The location of the Gaussian is found by approximating the derivative at each point in the data. Using the information about the derivative the location of all the peaks in the data can be found. Then the peaks are sorted from highest to lowest and the highest one is used as the height and location of the Gaussian peak. Then the lowest intensity valued point after the Gaussian is used as the beginning of the logistic function. The height of the flat part of the logistic is found by taking the average of the last twenty points of the data. The rest of the parameters of the data are found in a similar fashion. These initial parameters are reflected in the following graph where the data is shown in blue, the Gaussian function in yellow and the logistic function in pink.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RsU5DmzzXYI/AAAAAAAAADo/5ljCxusb3b0/s1600-h/01.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RsU5DmzzXYI/AAAAAAAAADo/5ljCxusb3b0/s400/01.jpg" alt="" id="BLOGGER_PHOTO_ID_5099544887187168642" border="0" /&gt;&lt;/a&gt;Once the initial parameters have been approximated using the previously described methods, they are optimized using the Levenberg-Marquardt algorithm using the implementation found in VNL by instantiating "vnl_levenberg_marquardt". The following graph represents the optimized parameters in the previous graph. Running the optimization widens the Gaussian, changed how steep the logistic function is, and adjusts the height of the flat part of the logistic. However, the location of the start of the logistic function and the position of the peak stays roughly the same.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RsU6BmzzXZI/AAAAAAAAADw/zH_yOnkvy3A/s1600-h/20.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RsU6BmzzXZI/AAAAAAAAADw/zH_yOnkvy3A/s400/20.jpg" alt="" id="BLOGGER_PHOTO_ID_5099545952339058066" border="0" /&gt;&lt;/a&gt;In the current segmentation metric implemented in the itk::IntensityProfileMetric the each intensity profile is modeled and the location in between the Gaussian peak and the start of the logistic function,the brain-skull interface, is used as a reference to tell how far off the current intensity profile is from its optimal location. This means that optimizing the parameters does not have a huge impact on the information that is finally extracted from the intensity profiles. Therefore, when the fitting function gives a least-squares error to the fit, it does not strongly correlate to how confident the location of the brain-skull interface was approximated. Another issue that has an impact on the error is the area of the flat part of the Gaussian, which represents all of the folds in the brain matter. This area contributes a great deal to the error in the resulting fit. But the contribution to the error from this area can be misleading since if the brain matter is very stable the error will be lower although the other parameters could still be off by a significant amount. So the use of error could be factored into the segmentation process, but can produce incorrect information as shown Gaussian Scaled Metric post, where when the error was weighted the same amount as the difference in location of the brain-skull interface. What the first plot in that post illustrates is that once the error is factored in, the metric doesn't converge to an optimal value anymore, but instead creates a situation where the metric becomes very uniform and gradient decent will not be able to converge to an optimal solution.&lt;br /&gt;&lt;br /&gt;Thus the use of error to weight the effects of each of the intensity profiles could be very deceiving in the final metric value and a method that looks at a neighborhood of the difference in location of the brain-skull interface of the intensity profile in question would be a more suitable alternative.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4112016372659876860?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4112016372659876860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4112016372659876860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4112016372659876860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4112016372659876860'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/intensity-profile-fitting-error.html' title='Intensity Profile Fitting Error'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/RsU5DmzzXYI/AAAAAAAAADo/5ljCxusb3b0/s72-c/01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-602492502822764763</id><published>2007-08-10T12:39:00.000-07:00</published><updated>2007-08-10T13:38:32.934-07:00</updated><title type='text'>Different Metric Mappings</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following plots show different ways that I mapped the metric into different mathematical functions. This was done by mapping all the metric values for a square surrounding the center of the brain MRI image to statistical function. The first is a Gaussian with narrow standard deviation.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrzAfYVfxfI/AAAAAAAAADQ/vkKxTlKDydE/s1600-h/gaussian3cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrzAfYVfxfI/AAAAAAAAADQ/vkKxTlKDydE/s400/gaussian3cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5097160523617650162" border="0" /&gt;&lt;/a&gt;The second is a Gaussian with a wider standard deviation. Just the first half of a Gaussian was used so the left hand tail up to the peak, meaning is the standard deviation is wider then there is less of a peak and therefore a greater range of mapped values for metric results with low values. Also, a lower metric value is better and means the ellipse has a better fit onto the skull.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/RrzAloVfxgI/AAAAAAAAADY/t7ifb-ZrS8Y/s1600-h/gaussian2cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/RrzAloVfxgI/AAAAAAAAADY/t7ifb-ZrS8Y/s400/gaussian2cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5097160630991832578" border="0" /&gt;&lt;/a&gt;The final plot is a mapping to a Sigmoid function that grows very steeply.&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrzArYVfxhI/AAAAAAAAADg/TkAORhO57OQ/s1600-h/sinosoid3cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrzArYVfxhI/AAAAAAAAADg/TkAORhO57OQ/s400/sinosoid3cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5097160729776080402" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-602492502822764763?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/602492502822764763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=602492502822764763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/602492502822764763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/602492502822764763'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/different-metric-mappings.html' title='Different Metric Mappings'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/RrzAfYVfxfI/AAAAAAAAADQ/vkKxTlKDydE/s72-c/gaussian3cropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-9132960866016911424</id><published>2007-08-09T16:29:00.000-07:00</published><updated>2007-08-09T17:33:43.689-07:00</updated><title type='text'>Gaussian Scaled Metric Value</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RrukvIVfxdI/AAAAAAAAADA/OXMnjFUDfR4/s1600-h/gaussianscaledmetriccropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RrukvIVfxdI/AAAAAAAAADA/OXMnjFUDfR4/s400/gaussianscaledmetriccropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096848532898301394" border="0" /&gt;&lt;/a&gt;The above visualization shows the same representation of the metric and coordinates on the brain slice image as the last post, but this time the metric value has been scaled. It was scaled by taking the metric value measured the difference between the brain-skull interface point on a sampled intensity profile compared with the optimal value for that point and scaling it to s Gaussian or normal curve. The same this was done to the fit of each of the intensity profiles and then the two values were added up to create the final metric. The results of this seem to show that the addition of emphasizing the error into each metric value seems to through off the metric and in this particular example it's hard to find where the optimal location of the metric would be located.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_U6dfB5RKuSU/RruxM4VfxeI/AAAAAAAAADI/zLCK_SZr77k/s1600-h/weighteddiffcropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_U6dfB5RKuSU/RruxM4VfxeI/AAAAAAAAADI/zLCK_SZr77k/s400/weighteddiffcropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096862238138942946" border="0" /&gt;&lt;/a&gt;The above image is just the weighted difference part of the metric excluding the error resulting from the fit to each of the intensity profiles. The way that the bottom of the distribution seems to be all around the same level could be due to crowding happening on the tail end of the normal distribution that it is being mapped to.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-9132960866016911424?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/9132960866016911424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=9132960866016911424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9132960866016911424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9132960866016911424'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/gaussian-scaled-metric-value.html' title='Gaussian Scaled Metric Value'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/RrukvIVfxdI/AAAAAAAAADA/OXMnjFUDfR4/s72-c/gaussianscaledmetriccropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-1233509378173051964</id><published>2007-08-08T16:56:00.000-07:00</published><updated>2007-08-08T17:03:26.141-07:00</updated><title type='text'>Metric Values Around Center</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following is a visualization of metric values around the center of the MRI brain slice. The location of the yellow dots on the plane parallel to the brain slice represents the two dimensional coordinates of the center of the ellipse with respect to the slice. The value that the points take in the z-direction or the direction normal to the brain slice represents the metric value that each location takes. In this case a lower metric value, meaning a point that has a distance closer to the brain slice in the normal direction is better and means that the ellipse is closer to the optimal location. This visualization is a square of locations with width of sixty pixels centered at the center of the image. It shows a gradual slope in towards a low metric value as the locations become closer to the center.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrpZpoVfxbI/AAAAAAAAACw/FUSCdWJqVjo/s1600-h/boxaroundcentercropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrpZpoVfxbI/AAAAAAAAACw/FUSCdWJqVjo/s400/boxaroundcentercropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096484500060226994" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-1233509378173051964?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/1233509378173051964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=1233509378173051964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1233509378173051964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1233509378173051964'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/metric-values-around-center.html' title='Metric Values Around Center'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/RrpZpoVfxbI/AAAAAAAAACw/FUSCdWJqVjo/s72-c/boxaroundcentercropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-4915310072368566865</id><published>2007-08-08T11:47:00.000-07:00</published><updated>2007-08-08T11:50:02.310-07:00</updated><title type='text'>Uniform Distribution In MCMC</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following results illustrate the MCMC simulation results using a uniform distribution as the proposal distribution with first a standard deviation of one followed by one using a standard deviation of two.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RroQSoVfxaI/AAAAAAAAACo/zrCp0gTa0rI/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RroQSoVfxaI/AAAAAAAAACo/zrCp0gTa0rI/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096403840574408098" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RroQIoVfxZI/AAAAAAAAACg/oR25qVyPoV8/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RroQIoVfxZI/AAAAAAAAACg/oR25qVyPoV8/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096403668775716242" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-4915310072368566865?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/4915310072368566865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=4915310072368566865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4915310072368566865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/4915310072368566865'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/uniform-distribution-in-mcmc.html' title='Uniform Distribution In MCMC'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/RroQSoVfxaI/AAAAAAAAACo/zrCp0gTa0rI/s72-c/cropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-9106739971004344597</id><published>2007-08-08T01:07:00.000-07:00</published><updated>2007-08-08T01:17:37.780-07:00</updated><title type='text'>MCMC Using VNL Random Generator</title><content type='html'>&lt;div style="text-align: justify;"&gt;I changed the MCMC simulation to use the built in VNL numerics library that comes with ITK and VTK and made it so that I sampled from Gaussian distributions by using the normal() function available. This seemed to improve the results if I stuck with the standard deviation of one. Otherwise with a standard deviation of .5 the results seemed to still be off. The following is the results of using a .5 standard deviation of the Gaussians followed by one using a standard deviation of one.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rrl7ooVfxWI/AAAAAAAAACI/N6qEFATLYu0/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rrl7ooVfxWI/AAAAAAAAACI/N6qEFATLYu0/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096240391298991458" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rrl7roVfxXI/AAAAAAAAACQ/0j9CeCYYHk4/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rrl7roVfxXI/AAAAAAAAACQ/0j9CeCYYHk4/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096240442838599026" border="0" /&gt;&lt;/a&gt;When making the registration work to run on Fedora I needed to change the way the intensity profiles are transfered into the metric class. Before it was passing a pointer to an array that held all of the intensities. This was causing a segmentation fault so to remedy this I needed to pass it my one array to write to. Another issue came about because of the GUI. In Fedora the size of the GUI needed to be increased to make sure that everything could be displayed. If the size was too small the resulting image showed nothing but a blank color.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-9106739971004344597?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/9106739971004344597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=9106739971004344597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9106739971004344597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/9106739971004344597'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/mcmc-using-vnl-random-generator.html' title='MCMC Using VNL Random Generator'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rrl7ooVfxWI/AAAAAAAAACI/N6qEFATLYu0/s72-c/cropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-7005497897196465897</id><published>2007-08-07T11:24:00.000-07:00</published><updated>2007-08-07T11:31:59.781-07:00</updated><title type='text'>More MCMC Results</title><content type='html'>&lt;div style="text-align: justify;"&gt;The following images were created using the MCMC method previously described with the addition of a method to check for convergence so that the algorithm will stop after a certain number of iterations. The method is to take a window for the last few iterations and in that window calculate the means and variations for each of the iterations. Then calculate the variance for those means and variations and when they go below a certain point to stop the segmentation process. The first image was found using a standard deviation of .5 for the Gaussian sampling scheme and the second with 1. They show the most likely location to be northwest of the correct location, which could be explained by that area having a local maximum or the fit to the intensity profiles being off.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rri6f4VfxVI/AAAAAAAAACA/JkjyGuvjKGs/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rri6f4VfxVI/AAAAAAAAACA/JkjyGuvjKGs/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096028035230975314" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rri6Y4VfxUI/AAAAAAAAAB4/ttSo6AdmfOs/s1600-h/cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rri6Y4VfxUI/AAAAAAAAAB4/ttSo6AdmfOs/s400/cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5096027914971891010" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-7005497897196465897?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/7005497897196465897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=7005497897196465897' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/7005497897196465897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/7005497897196465897'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/more-mcmc-results.html' title='More MCMC Results'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rri6f4VfxVI/AAAAAAAAACA/JkjyGuvjKGs/s72-c/cropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-1774068618196342666</id><published>2007-08-03T14:04:00.000-07:00</published><updated>2007-08-03T18:16:16.528-07:00</updated><title type='text'>Intensity Profile GUI Additions And MCMC Results</title><content type='html'>&lt;div style="text-align: justify;"&gt;To delineate where exactly the intensities are being taken from mesh I colored the graph to make it easier to see. The red and blue colors of the graph correspond to the red and blue parts of the normal lines emanating from the ellipse. There is also a blue line on the graph that represents where the mesh is located in between the two normals. The following is a still of the GUI in action.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrOZEoVfxSI/AAAAAAAAABo/gLiNL8jHTDI/s1600-h/igui2colorgraphcropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrOZEoVfxSI/AAAAAAAAABo/gLiNL8jHTDI/s400/igui2colorgraphcropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5094583908312270114" border="0" /&gt;&lt;/a&gt;The following are the previous MCMC results with the ellipse coloring trying to follow the same coloring as the squares although for some reason when points are used instead of faces in a vtkPolyData the coloring for the opacity doesn't work as when. But it shows a distribution that follows the squares and points better.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrPTKYVfxTI/AAAAAAAAABw/P1wW3SKc2-I/s1600-h/999cropped.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrPTKYVfxTI/AAAAAAAAABw/P1wW3SKc2-I/s400/999cropped.jpg" alt="" id="BLOGGER_PHOTO_ID_5094647778770928946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-1774068618196342666?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/1774068618196342666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=1774068618196342666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1774068618196342666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1774068618196342666'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/intensity-profile-gui-additions.html' title='Intensity Profile GUI Additions And MCMC Results'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/RrOZEoVfxSI/AAAAAAAAABo/gLiNL8jHTDI/s72-c/igui2colorgraphcropped.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-659755520200357287</id><published>2007-08-03T11:09:00.000-07:00</published><updated>2007-08-03T11:24:25.741-07:00</updated><title type='text'>MCMC Results</title><content type='html'>&lt;div style="text-align: justify;"&gt;Using the new intens_process class the following represents running the Markov Chain Monte Carlo for 2000 iterations. The yellow dots represents the centers of the red ellipses that are colored according to their likelihood with darker ones being more probable. There are also red squares that are places on top of the points that are colored the same way as the ellipses and represent the probability of the region they cover. These results show a mean that is very close to the actual one but at this point I haven't implemented a way to stop the simulation in a formal manner so more iterations may have changed the result.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrNwooVfxQI/AAAAAAAAABY/Lw9HmUIwEtc/s1600-h/newipmcmcr.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/RrNwooVfxQI/AAAAAAAAABY/Lw9HmUIwEtc/s400/newipmcmcr.jpg" alt="" id="BLOGGER_PHOTO_ID_5094539446810821890" border="0" /&gt;&lt;/a&gt;Another result of the new intens_process is that the intensity profile fits on the top and bottom of the skull have improved and now are as good as the sides. This is shown in the following images with the arrows colored red being the ones with a very high error in their fit to the intensity profile data. There is still one issue with the fit because of regions near the top left and right where the skull boundary has a thicker boundary and also lighter in comparison to the brain matter. Because of this the fit will sometimes pick a peak within the brain matter because the highest intensity value is in that area. I am still trying to find an appropriate algorithm to remedy this matter.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RrNyoIVfxRI/AAAAAAAAABg/74XFbjnQRzA/s1600-h/newipregr.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RrNyoIVfxRI/AAAAAAAAABg/74XFbjnQRzA/s400/newipregr.jpg" alt="" id="BLOGGER_PHOTO_ID_5094541637244142866" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-659755520200357287?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/659755520200357287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=659755520200357287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/659755520200357287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/659755520200357287'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/mcmc-results.html' title='MCMC Results'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/RrNwooVfxQI/AAAAAAAAABY/Lw9HmUIwEtc/s72-c/newipmcmcr.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-1966784874833202824</id><published>2007-08-02T11:06:00.000-07:00</published><updated>2007-08-02T12:34:41.181-07:00</updated><title type='text'>Intensity Profile GUI</title><content type='html'>&lt;div style="text-align: justify;"&gt;Some of the results that came up from using the MCMC on the final segmentation seemed to be inconsistent with what the correct location of the ellipse should have been. So I took a closer look at what the intens_process class was grabbing from the image by using the intensity profile GUI. To make the GUI a little more clearer I added the slice being looked at in the image to the background and then added lines that represent the normals going inside the mesh with light blue, and the normal lines going outside the mesh with red. Another issue that came up was that the intensities were being sampled by taking the paths of normals arising from the points in the mesh, not the cells. So, I edited the intes_process class so that it would calculate the centers of each face of the mesh and use those points to take the data for the profiles by using normal lines emanating out from it. The only problem with having the image slice in the background is that it makes the mesh harder to see, although this problem might be alleviated by using a brighter color for the mesh or adding lines to it that emphasize its location. I also added the number of the cell into the graph title.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The results found using these changes improved the intensity profiles by having them make more sense in this context with most of the intensity profiles fitting the two Gaussian logistic model. Although having the intensity profiles sampled from the points of the mesh may not have been that big of an issue since they do coincide somewhat with the locations of the faces of the mesh.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrIvloVfxPI/AAAAAAAAABQ/5q9PER8HQc0/s1600-h/newigui2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_U6dfB5RKuSU/RrIvloVfxPI/AAAAAAAAABQ/5q9PER8HQc0/s400/newigui2.jpg" alt="" id="BLOGGER_PHOTO_ID_5094186452038698226" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-1966784874833202824?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/1966784874833202824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=1966784874833202824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1966784874833202824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1966784874833202824'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/08/intensity-profile-gui.html' title='Intensity Profile GUI'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_U6dfB5RKuSU/RrIvloVfxPI/AAAAAAAAABQ/5q9PER8HQc0/s72-c/newigui2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-1890025501445309172</id><published>2007-07-31T12:00:00.000-07:00</published><updated>2007-07-31T12:42:33.873-07:00</updated><title type='text'>Uncertainty Estimation</title><content type='html'>&lt;div style="text-align: justify;"&gt;The segmentation program built so far uses an elliptical shape model to delineate the interface between the skull and brain. This location is found by using information along lines normal to the ellipse location using the intensity information through intensity profiles. Optimization is completed using gradient descent. To get the initial starting coordinates a center of mass is calculated for the lighter voxels that represent the brain matter. Now to calculate the uncertainty of the segmentation a function was added to itk::IntensityProfileMetric that implements Markov Chain Monte Carlo (MCMC) using the Metropolis-Hastings algorithm.&lt;br /&gt;&lt;br /&gt;The MCMC method quantifies the uncertainty by being able to calculate a variance for the distribution. In this case the distribution concerns two parameters, the two-dimensional coordinates that represent the location of the ellipse in respect to the MRI image.&lt;br /&gt;&lt;br /&gt;The following is the output of the MCMC run and shows all the sampled coordinate locations in yellow that represent the locations of the center of the ellipses shape model. The red squares in the background represent the probability associated in the region encompassing the square, with darker red meaning more probable and lighter meaning less. The background in the slice that is being segmented with the yellow center points coinciding to their relative position on the MRI image.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rq-PqIVfxLI/AAAAAAAAAAw/6gR1KEAuGdU/s1600-h/MCMCyellowdotredsquare5000.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rq-PqIVfxLI/AAAAAAAAAAw/6gR1KEAuGdU/s400/MCMCyellowdotredsquare5000.jpg" alt="" id="BLOGGER_PHOTO_ID_5093447657534244018" border="0" /&gt;&lt;/a&gt;The following image represents the MCMC coordinates that were sampled by showing the different ellipses in their appropriate location. When the ellipse is darker that means the location is more probable and when the ellipse is less probable the color is a lighter red.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rq-QdIVfxMI/AAAAAAAAAA4/lYgBLe9Z_9M/s1600-h/MCMCredellipses.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/Rq-QdIVfxMI/AAAAAAAAAA4/lYgBLe9Z_9M/s400/MCMCredellipses.jpg" alt="" id="BLOGGER_PHOTO_ID_5093448533707572418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-1890025501445309172?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/1890025501445309172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=1890025501445309172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1890025501445309172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/1890025501445309172'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/07/uncertainty-estimation.html' title='Uncertainty Estimation'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_U6dfB5RKuSU/Rq-PqIVfxLI/AAAAAAAAAAw/6gR1KEAuGdU/s72-c/MCMCyellowdotredsquare5000.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-2465912742499923736</id><published>2007-03-24T14:09:00.000-07:00</published><updated>2007-03-24T14:22:02.275-07:00</updated><title type='text'>Up &amp; Down Translation Movie</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-6210729742057646435&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-2465912742499923736?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/2465912742499923736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=2465912742499923736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/2465912742499923736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/2465912742499923736'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/03/up-down-translation-movie.html' title='Up &amp; Down Translation Movie'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-8808426566568038102</id><published>2007-03-22T23:40:00.000-07:00</published><updated>2007-03-24T14:08:31.924-07:00</updated><title type='text'>Registration Using Intensity Profiles</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=4680185114170102324&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=17338532851597885&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The preceding movies are of the registration using intensity profiles around the ellipse ring model that are used in the itk::ItensityProfileMetric to bring the ellipse to the skull brain boundary. The metric takes the intensities along coming from a normal from a face on the ellipse ring model and fits a parametric model to them. The model in most cases is a Gaussian followed by a logistic. The Gaussian represents the area of the skull where the intensities get very high and the logistic represents first the empty space between the skull and the brain and then a leveling off that represents the actual brain matter. Once the model is fit the metric will find the position between the Gaussian and the logistic of the data and compare that position to the optimal location of that point. Using that information it will decide what direction and magnitude to proceed to make the position of the point in between the Gaussian and logistic closer to the optimal position. This is done for all of the faces around the elliptical ring and those directions are multiplied by their magnitude and then added together to get the average direction that the intensity profiles are telling to proceed. The magnitudes of all the intensity profiles are also added together and their average is take and used and the magnitude of the metric. Both the magnitude and direction resulting from the metric are passed to the itk::VersorRigid3DtransformOptimizer as the value and derivative and are used to decide where to move the parameters of the ellipse next. The transform being used is the itk::VersorRigid3Dtransform.&lt;br /&gt;&lt;br /&gt;The movies above show the ellipse iteratively moving to its optimal location. The arrows represent the direction and the magnitude that each of the intensity profiles is telling the optimizer to move. They were created by using vtkLineSource for the shaft of the arrows and vtkConeSource for the pointer part. They were all added into a vtkAssembly which was in turn fed into the vtkRenderer. The resolution was set to one to better facilitate the drawing of so many arrows on the display. The arrows start at the centroid of a face translated by whatever the parameters of the current iteration. Only the arrows in blue are being factored in the registration and direction of the optimizer. The red arrows were filtered by taking the mean magnitude of the intensity profiles and seeing which intensities had a magnitude much greater than that and filtering those out. In the future this could be improved by looking at the covariance of the intensity profiles and from that information deciding how the different intensity profiles should be factored in and to also weight how well of a fit the parametric models are to the data.&lt;br /&gt;&lt;br /&gt;Another issue that could be causing problems in the directions of the normals of the mesh and how the intens_process class calculated the normals when getting intensities from the image. The graph at the bottom of the display focuses on one particular intensity process, in this case one at the bottom of the ellipse model. Intensities being displayed in the diagram seem to vacillate greatly and this may be caused by there being issues with the normals. This could be analyzed by analyzing what the normal directions are and visually inspecting what the data should look like. But overall the intensity profiles seem to work well at getting the ellipse into the correct position with an initial offset of about twenty pixels.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-8808426566568038102?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/8808426566568038102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=8808426566568038102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8808426566568038102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8808426566568038102'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/03/registration-using-intensity-profiles.html' title='Registration Using Intensity Profiles'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-7824154677433696332</id><published>2007-01-09T17:05:00.000-08:00</published><updated>2007-03-22T23:40:26.323-07:00</updated><title type='text'>Derivative &amp; Blurring</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-6420053151558515308&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The above is a movie of the registration process with the changes added below.&lt;br /&gt;&lt;br /&gt;I got the registration to accept the new derivative that I created. The derivative is calculated by using the normal direction of the face on the mesh that I am interested in multiplied by the magnitude of the metric. The metric is calculated by finding the chi-squared difference between the point in between the Gaussian and the logistic fit positions to the data in the intensities. The derivative has to be negated since in the itk::VersorRigid3DTransformOptimizer it assumes that the derivative is calculated from the gradient and that would point in the direction of the maximum, and in the case I am looking at I am trying to minimize the metric value and therefore the optimizer will try to compensate for that by changing the direction of the derivative. I had issues with the metric going off in a weird direction before, but I found that the problem stemmed from the scaling in the optimizer. I had drowned out the angle and z-parameters in the itk::PointSetToImageRegistrationMethod registration framework by scaling the values with 10000000000000.0, which would divide the derivative value inside the optimizer and therefore make it have no contribution to the registration at all. In some of the ITK examples I had found that they used a translation scaling of 1/1000 for the parameters of interest, specifically the translation parameters. So I thought that I could be having issues with that drowning out the effects of the derivative value that I had created. So I set that value to 1 and the registration finally performed as I expected it to with the derivative that I had been feeding it. In this particular situation I had been experimenting with just one intensity process, but now I need to add the rest of the intensity values back into the registration. The registration now works using translation with one intensity profile from any distance as long as the fitting program is able to work with the intensities that it is passed.&lt;br /&gt;&lt;br /&gt;I also figured out where the skipping of the lines was located. It was a line in the intens_process class that would throw out a new line as it were iterating through the cells. And I completed changing the itk::IntensityProfileMetric class so that it only loads the image into the intensity_process class process once in the class constructor. Thus the speed is increased for each iteration, but starting up the program takes a long time because the image is being smoothed using itk::BinomialBlurImageFilter which helps to stabalize the results of the fitting program from iteration to iteration.&lt;br /&gt;&lt;br /&gt;Another thing that might be good to complete would be to finish making the visualization that shows the normals and the magnitudes that they contribute to the metric and derivative.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-7824154677433696332?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/7824154677433696332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=7824154677433696332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/7824154677433696332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/7824154677433696332'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/01/derivative-blurring.html' title='Derivative &amp; Blurring'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-967381177290063760</id><published>2007-01-05T16:08:00.000-08:00</published><updated>2007-03-22T17:05:27.143-07:00</updated><title type='text'>Derivatives &amp; Metric</title><content type='html'>&lt;div style="text-align: justify;"&gt;Today I was looking into ways to improve the registration. One thing that needs to be analyzed is how the derivative is computed in the itk:IntensityProfileMetric. This value could be making the optimizer go off in the wrong direction. I also need to look at the optimizer to see how it takes into account the derivative and how it looks at the value of the metric to decide on what direction to take next. Another thing that needs to be improved is loading all the necessary components of the itk::IntensityProfileMetric. Right now it instantiates an instance of the intensity process class in each iteration, I need to make them class members and do all of that work once. Another improvement would be to find what is making the output of the command iteration class, that tells what the parameters of the registration are, skip so many lines before it enters another value.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The fit to the values of the intensity profile could also need some help, because in some instances it seems as though it is coming off giving an error that is bringing the ellipse closer to the wrong direction. Smoothing has been implemented, but the intensity profile metric class needs to be adjusted to allow for testing since it is too slow.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-967381177290063760?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/967381177290063760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=967381177290063760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/967381177290063760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/967381177290063760'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2007/01/derivatives-metric.html' title='Derivatives &amp; Metric'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-6297982882520618402</id><published>2006-12-08T02:14:00.001-08:00</published><updated>2007-03-24T14:33:56.864-07:00</updated><title type='text'>Fitting Using Levenberg-Marquardt Algorithm</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-1144349236217064290&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The intensity data taken from the 3D MRI was very noisy resulting in a fit with a high error. We created a different metric to alleviate the effects of the high error. In this method, we looked at the midpoint in between the end of the Gaussian and the beginning of the logistic for each intensity profile and found the difference between that and the optimal position for the point. This required that the data be fitted to the Gaussian and logistic model every iteration. My previous method of exhaustively trying all the combinations of parameters would have been too slow for this situation. Therefore, I tried to improve the fitting program by implementing the Levenberg-Marquardt algorithm to speed up the process. This was added to the fitting code and produced results that were very close to the previous fit with a huge boost in efficiency. A movie of the process is shown above.&lt;br /&gt;&lt;br /&gt;Once I had completed making the fit program faster, I moved on to adding it into the intensity profile metric where it would analyze the intensities at each iteration and find the point between the Gaussian and logistic and compare that to the optimal position. The registration would work well if the offset was within about ten pixels of the optimal position. If I increased the offset, the optimizer would start heading in the opposite direction away from the brain even though the metric would be increasing. This might have something to do with a setting in the optimizer needing adjusting. A movie of this process follows. The blue line on the ring of points shows the specific intensity that I am looking at and the graph shows the intensity data in orange with the fit in white and the optimal position for the mid point in between the end of the Gaussian and beginning of the logistic with a green line.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=539082368430369499&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-6297982882520618402?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6297982882520618402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/6297982882520618402'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/12/fitting-using-levenberg-marquardt_08.html' title='Fitting Using Levenberg-Marquardt Algorithm'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-8718645538594368598</id><published>2006-11-21T16:45:00.000-08:00</published><updated>2006-12-09T23:18:54.157-08:00</updated><title type='text'>Registration Using Intenisty Profiles</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-6931920828060698302&amp;hl=en" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL"  FlashVars="playerMode=embedded"&gt; &lt;/embed&gt; &lt;br /&gt;&lt;div style="text-align: justify;"&gt;To test out the registration I began by starting the ring that I am using ten pixels away from the optimal location. Then I implemented the intensity profile metric using the intensities at just one point in the ring. The metric value was calculated by taking the intensities at that point during each step of the registration and finding the least squares error between the model I had created for the intensities when the model was in the optimal location of the image. The preceding movie shows the metric smoothly converging to the correct value since in this case I am using just one point in the model instead of all the points the errors in my model fitting aren't overwhelming the metric value which had been a problem.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;To create the model I use a Gaussing plus a Logistic function as illustrated in the following equation&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_U6dfB5RKuSU/RXuxeZTEArI/AAAAAAAAAAM/ABKnGn3t9GM/s1600-h/equation2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_U6dfB5RKuSU/RXuxeZTEArI/AAAAAAAAAAM/ABKnGn3t9GM/s400/equation2.jpg" alt="" id="BLOGGER_PHOTO_ID_5006790546497471154" border="0" /&gt;&lt;/a&gt;To fit all of the parameters I wrote a C++ program that would find all the peaks by looking at the first derivative using surrounding points and then finding the most significant one by looking at the second derivative. The beginning of the logistic was found using a similar method. To find the rest of the parameters I started out using values roughly in the range of the correct ones and then exhaustively tried different combinations to find the optimal fit. The previous post shows some examples of how well the fit is with some of the data.&lt;br /&gt;&lt;br /&gt;When gathering data from the intensities around points from the ring, most conform to the Gaussian-Logistic model except the top and bottom of the ring which is more of two Gaussian functions as illustrated in the following graph&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_U6dfB5RKuSU/RXuyd5TEAsI/AAAAAAAAAAY/KEUO8p1MsjA/s1600-h/2gaussians.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_U6dfB5RKuSU/RXuyd5TEAsI/AAAAAAAAAAY/KEUO8p1MsjA/s400/2gaussians.jpg" alt="" id="BLOGGER_PHOTO_ID_5006791637419164354" border="0" /&gt;&lt;/a&gt;To alleviate this issue the fitting code can be augmented to take into account model selection to see whether a different combinations of Gaussian and logistic functions would work better.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-8718645538594368598?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/8718645538594368598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=8718645538594368598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8718645538594368598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/8718645538594368598'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/11/registration-using-intenisty-profiles.html' title='Registration Using Intenisty Profiles'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_U6dfB5RKuSU/RXuxeZTEArI/AAAAAAAAAAM/ABKnGn3t9GM/s72-c/equation2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-116356808501656360</id><published>2006-11-14T21:15:00.000-08:00</published><updated>2006-11-15T07:40:29.141-08:00</updated><title type='text'>Fitting Intensity Profiles</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/2120/3924/1600/3.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/2120/3924/400/3.jpg" alt="" border="0" /&gt;&lt;/a&gt;Using the set up in the receding image, I was able to extract intensities along the red ellipse in the image. I have used a sampling range of 120 &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;pixels&lt;/span&gt; to extract data. To accomplish this I implemented the intensity profile class that I had to change slightly to make sure that all the intensities were coming from the outside into the brain so that I could compose a regular model for the data. Once this was done I looked at the graphs of the &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;average&lt;/span&gt; intensities that resembled the following graph.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/2120/3924/1600/5.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/2120/3924/400/5.jpg" alt="" border="0" /&gt;&lt;/a&gt;I had initially tried to model the intensities using two &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Gaussians&lt;/span&gt;&lt;/span&gt; along with a logistic, but after experimenting with various data I found that some of the data contained up to five &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Gaussians&lt;/span&gt;&lt;/span&gt; and some with just one. But usually there was one main &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Gaussian&lt;/span&gt;, so I changed my model to used one &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Gaussian&lt;/span&gt; and one logistic. The following two graphs represent the models that I created in the red color and the data in the green. In some cases I was able to get the model to fit very well in the case of the first graph, but others the match was not as good. I constructed this by making a C++ code that would find the &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Gaussians&lt;/span&gt;&lt;/span&gt; by looking at the derivative and second derivative of points to fins it, then I would give a rough estimate for the rest of the parameters in the &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Gaussian&lt;/span&gt; and logistic and many different combinations till I came up with a &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;reasonable&lt;/span&gt; one.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/2120/3924/1600/4.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/2120/3924/400/4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger2/2120/3924/1600/1.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger2/2120/3924/400/1.jpg" alt="" border="0" /&gt;&lt;/a&gt;I also added all the intensity profiles into the registration process where I took a sampling of every tenth face in my ring structure and calculated the intensities of the image at that point compared with the model and then took the least squares error and added it up for each face as the metric value. Right now it seems to be stable if I make the &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;optimizer's&lt;/span&gt;&lt;/span&gt; movements very minor, but I am not sure &lt;span onclick="BLOG_clickHandler(this)" class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;whether&lt;/span&gt; that is significant.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-116356808501656360?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/116356808501656360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=116356808501656360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116356808501656360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116356808501656360'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/11/fitting-intensity-profiles.html' title='Fitting Intensity Profiles'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-116226189597457332</id><published>2006-10-30T18:21:00.000-08:00</published><updated>2006-11-14T21:51:45.001-08:00</updated><title type='text'>Visualizing Intensity Profiles</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/twointensities.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/400/twointensities.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;After completing the conversion of the itkMesh to a vtkPolyData and the calculation of the normals from the mesh, I started working with the intensity profile visualizer to analyze what the intensities look like. I was able to pass the class my itkMesh and vtkMesh directly to set up the visualization. The normals were read in from a file that I had made from the registration process, although this can be changed to get the normals directly from the mesh being looked at. One issue that needed to be dealt with was the offset of the mesh to make sure that it was in range with the image to calculate the intensities. I had kept getting a segmentation fault error that was probably due to the points in the mesh out of the image’s range. Adding an offset to each point in the mesh was able to help keep the mesh in range of the image. There were also some issues with the cells being undefined at certain points that has to due with how I initialized them and the count that I used to iterate through the points.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;I was able to view some of the intensity profiles as seen in the above pictures of my three-dimensional ring that uses triangular faces on the edge to get normals to use to find the intensities at certain areas in the image. These initial profiles are not uniformly distributed throughout the image because the points could be better positioned around the skull area. To find the optimal value I will need to run the registration process again using the points to figure out the best possible position so as to get a better idea of where I can extract a general shape of the intensity profiles of the image.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-116226189597457332?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/116226189597457332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=116226189597457332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116226189597457332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116226189597457332'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/10/visualizing-intensity-profiles.html' title='Visualizing Intensity Profiles'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-116216029716461210</id><published>2006-10-29T14:17:00.000-08:00</published><updated>2006-11-14T21:51:44.903-08:00</updated><title type='text'>Mesh Conversion And Normals</title><content type='html'>&lt;div style="text-align: justify;"&gt;To calculate the normals in the mesh created in the registration process, I converted the itkMesh into a vtkPolyData so that I could use vtkPolyDataNormals to easily find the face normals. ITK has some already made classes like itkMeshTovtkPolyData that contained a class to complete the process. I tried to implement an instance of the class to convert my itkMesh, but ran into problems with the itkMeshTovtkPolyData class complaining that the itkMesh that I was passing was of const type. Therefore, I added the functions that I needed directly into the itkIntensityProfileMetric class. I confirmed that the itkMesh had been converted to a vtkPolyData by checking the number of points and cells. Once this had been completed, I set out to calculated the normals for use in the itkIntensityProfileMetric and the GUI that displays the intensities for the faces of the mesh. However, I kept getting an error from the vtkPolyDataNormals class that stated there has been a segmentation fault. This may be due to the vtkPolyData that I created not having enough information to be considered a true Mesh or some the fields are not instantiated correctly.&lt;br /&gt;&lt;br /&gt;Because of the problems that I encountered with the vtkPolyDataNormals class, I just calculated the normals myself. I accomplished this by storing the points in a double matrix then iterated through the triangle cells and computed the normal vector from the three points stored in each cell. Once the normals were computed I stored them in their own double matrix and made them unit vectors by dividing them by their length. After storing the normal vectors, I outputted them to a file for use in the intensity profile viewer. Incorporating the normals and the mesh into the viewer involves changing the way the viewer inputs meshes from .wrl files to just passing it a completed itkMesh or vtkPolyData.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-116216029716461210?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/116216029716461210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=116216029716461210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116216029716461210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/116216029716461210'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/10/mesh-conversion-and-normals.html' title='Mesh Conversion And Normals'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115932502090010970</id><published>2006-09-26T19:34:00.000-07:00</published><updated>2006-11-14T21:51:44.831-08:00</updated><title type='text'>Cells In itkMesh</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have completed inserting the face data into an itkMesh that includes the point data for the ring in the 3D-registration process. By changing the parameters in the registration to use an itkMesh I was able to get the registration successfully running. Then I began to work on the intensity process metric and ran into some problems. Declaring the iterators and different variables in the class using the templated names of the data types has proved difficult. With the inclusion of the itkMesh the iterators for moving through the cells were elusive in the  ITK class structure so I had to declare them explicitly.  Then I found that there is no simple way to access the cell data in the itkMesh. Some of the reason for this is that ITK allows for a heterogenous sampling of cells to be included in an itkMesh. The methods in the ITK manual include creating visitor classes that seem way too complicated for the task of simply accessing information stored in a cell. I am currently looking for functions that could easily get the point data in the cells so that I will be able to calculate the normals.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115932502090010970?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115932502090010970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115932502090010970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115932502090010970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115932502090010970'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/cells-in-itkmesh.html' title='Cells In itkMesh'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115871752473881672</id><published>2006-09-19T18:42:00.000-07:00</published><updated>2006-11-14T21:51:44.758-08:00</updated><title type='text'>3D-Registration</title><content type='html'>&lt;div style="text-align: justify;"&gt;Using a three-dimensional point set requires the registration to be changed so that it contains a three-dimensional transform, optimizer, and image. I first tried to use the itkRigid3DTransform but found that it was also a base class for more specific transforms. itkVersorRigid3DTransform was one of the transforms derived from itkRigid3DTransform and allowed rotation along with translation. The transform had its own tailored optimizer called itkVersorRigid3DTransformOptimizer that would work over the six parameter in the transform. After inserting the optimizer and transform into the registration process I needed to change all the instances of point sets in the registration and visualization into three-dimension ones. The initial parameters in the transform and the scales in the optimizer needed to be augmented to take into account there now being six parameters.&lt;br /&gt;&lt;br /&gt;Once the registration was up and running I started to play around with different coordinates to see whether it was working properly. I started by enabling just translation in the x and y-direction by scaling out all the other parameters. Thus the registration was basically two-dimensional over a slice of the three-dimensional image. But the metric value remained extremely small. Throughout the extant of the process there were not any drastic or significant changes. This could be the result of the image not being read correctly into ITK or the point set being in the incorrect position relative to the image.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115871752473881672?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115871752473881672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115871752473881672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115871752473881672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115871752473881672'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/3d-registration.html' title='3D-Registration'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115863195461505085</id><published>2006-09-18T19:05:00.000-07:00</published><updated>2006-11-14T21:51:44.649-08:00</updated><title type='text'>Displaying The 2D-Slice</title><content type='html'>&lt;div style="text-align: justify;"&gt;When I first tried to display the slice that came from the 3D-image, it resulted in VTK displaying a completely deformed image that had the bulk of the image colored blue with a red border. I had originally thought that this had to do with the itkImageToVTKImageFilter distorting the data received from ITK. Therefore, I wrote out the image as a .png file and loaded that into VTK, but the problem persisted. This led to me to think that the problem stemmed from the format of the data that I was passing to the VTK interface. The 3D-image had been loaded with a pixel type of unsigned short. I had used unsigned char when VTK had previously worked to display .png files. So I went about trying to change the pixel format of the slice that I had removed. The first filter I tried was the itkImageToImageFilter that would not instantiate itself as a new object due to it being a base class to be used only by other classes derived from it. Then I tried to use the itkRescaleIntensityImageFilter filter. This was able to convert from unsigned short pixels to unsigned char and output an image in that format. I connected the output from the filter to the itkImageToVTKImageFilter and passed that into my VTK visualization set up to successfully display the slice.&lt;br /&gt;&lt;br /&gt;The following is an image of the distorted slice on the left and the corrected version on the right:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/together.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/400/together.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115863195461505085?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115863195461505085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115863195461505085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115863195461505085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115863195461505085'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/displaying-2d-slice.html' title='Displaying The 2D-Slice'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115853018660885316</id><published>2006-09-17T14:17:00.000-07:00</published><updated>2006-11-14T21:51:44.547-08:00</updated><title type='text'>itkPointSet And 3D-Images</title><content type='html'>&lt;div style="text-align: justify;"&gt;The problem with loading the itkPointSet into the Registration process had to do with the point data part of the object being empty. When a point set was outputted from the narrow band filter, it filled the point data for each point with the distance it was from the outside of the band. I am not sure exactly how the registration process uses the data. Although in the case of my ellipse, the registration did not work as well when I inserted large values into the data area of itkPointSet that I was creating. After trying various values, I found the optimal value for the point data to be zero.&lt;br /&gt;&lt;br /&gt;To make the ring I need to create a point set with three dimensions. This will require the transform to be changed to something that can handle three dimensional point sets. The image used in the process will also need to be in three dimensions. So I began the process of loading in a three dimensional image. I focused my attention on the visualization part using VTK where a two-dimensional image will be displayed. Getting the slice of the three dimensional image that I wanted was accomplished by using the itkExtractImageFilter. I was able to write the slice out to a .png file, but if I passed it to vtk's visualization machinery using itkImageToVTKImageFilter it produced an image that was completely distorted. To fix this I am trying to pass the two-dimensional slice I have into the itk::ImageToImageFilter to change its pixel representation.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115853018660885316?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115853018660885316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115853018660885316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115853018660885316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115853018660885316'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/itkpointset-and-3d-images.html' title='itkPointSet And 3D-Images'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115817865627249994</id><published>2006-09-13T13:16:00.000-07:00</published><updated>2006-11-14T21:51:44.404-08:00</updated><title type='text'>Creating An Ellipse</title><content type='html'>&lt;p style="text-align: justify; font-family: arial;" class="MsoNormal"&gt;To create a set of points to represent an ellipse, I first used the equation (x&lt;sup&gt;2&lt;/sup&gt;/79&lt;sup&gt;2&lt;/sup&gt;) + (y&lt;sup&gt;2&lt;/sup&gt;/95&lt;sup&gt;2&lt;/sup&gt;) = 1, solving for y and inserting x-values from -79 to 79, with increments of 0.5. This created around 600 points. The problem was that the sides of the ellipse contained very few points, due to the relatively high changes in the y-direction along the left and right sides of the ellipse. Using the equation in polar coordinates resolved that problem. This was accomplished by incrementing from zero to 2π and plugging that into r&lt;sup&gt;2&lt;/sup&gt; = (79&lt;sup&gt;2&lt;/sup&gt;95&lt;sup&gt;2&lt;/sup&gt;) / (79&lt;sup&gt;2&lt;/sup&gt;sin&lt;sup&gt;2&lt;/sup&gt;(Θ) + 95&lt;sup&gt;2&lt;/sup&gt;cos&lt;sup&gt;2&lt;/sup&gt;(Θ)) as the angle. After converting the resulting polar coordinates into rectangular ones, I was able to create an ellipse that had a uniform spread of points along the border. The following is an image of the ellipse using the rectangular coordinate representation of the equation on the left, and the one using the polar coordinate representation on the right:&lt;/p&gt;  &lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/equations.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/400/equations.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a style="font-family: arial;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/equations.0.jpg"&gt;&lt;/a&gt;&lt;div style="text-align: justify;"&gt;  &lt;p class="MsoBodyText"&gt;&lt;span style="font-family: arial;"&gt;Once I had all the points stored into an itkPointSet, I tried to incorporate that into the registration process, but ended up with a segmentation fault error. Taking the itkPointSet that was the output from the spatial object filter on the old ellipse, and replacing its point data with my newly created points fixed the problem. There is some parameter on the itkPointSet that I need to set to get it to work properly. I used the function "Print( std::cout )", that is a part of each itkPointSet, to print out and compare the details of the two itkPointSet objects. The only differences were in the fields "Requested Number Of Regions" with the old point set having its value as two, and mine have a value of zero, and in the field "Reference Count" with a two for the old point set and one for mine.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115817865627249994?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115817865627249994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115817865627249994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115817865627249994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115817865627249994'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/creating-ellipse.html' title='Creating An Ellipse'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115810840334368406</id><published>2006-09-12T17:26:00.000-07:00</published><updated>2006-11-14T21:51:44.315-08:00</updated><title type='text'>itkPointSet And itkMesh</title><content type='html'>&lt;p style="text-align: justify;" class="MsoNormal"&gt;I had created an itkPointSetNormal class that was derived from itkPointSet, but now it seems that the functionality I was trying to capture is already in the itkMesh class. My task was to create a point set that contained the normals along with the points. Although calculating the normals would be difficult if the object started with was more complicated than a circle. One solution is to create a ring structure made up of triangular faces that would then be used to calculate the normals of the points. The class itkMesh allows for all of the abilities of itkPointSet with the addition of cells that contain information about the connectivity of two, three, or four points. Each cell can also have a piece of data attached to it. This allows there to be cells with three points representing a face along with a normal attached as the data.&lt;br /&gt;&lt;br /&gt;In the current registration, I am using an ellipse as the shape. So to create the ring structure, I will use the equation &lt;span style="font-family:Arial;"&gt;(x&lt;sup&gt;2&lt;/sup&gt;/79&lt;sup&gt;2&lt;/sup&gt;) + (y&lt;sup&gt;2&lt;/sup&gt;/95&lt;sup&gt;2&lt;/sup&gt;) = 1&lt;/span&gt; which will give me a row of points that represents the boundary of the ellipse, and where all the coordinates in the z-direction are zero. Supplementing that will be a duplicate ellipse except that in this one the z-coordinates will be negative one. This permits the two ellipses to connect together through triangular faces on their perimeter. The calculations of the normals will be handled in the metric class, where the direction will be the average of the normals of the faces that are adjacent to a point.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115810840334368406?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115810840334368406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115810840334368406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115810840334368406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115810840334368406'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/itkpointset-and-itkmesh.html' title='itkPointSet And itkMesh'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115767452560286754</id><published>2006-09-07T16:11:00.000-07:00</published><updated>2006-11-14T21:51:44.147-08:00</updated><title type='text'>Calculating Normals</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;The next step in furthering the registration process is to add intensity processes. Sean Mann, another undergrad in the lab, has already written the retrieval of the intensities from a mesh and image in a class. To incorporate that into the registration I need to pass the point set in as a vtkMesh and calculate the normals from my point set.&lt;br /&gt;&lt;br /&gt;I finished writing some functions that calculate the normals from the itkPointSet that I get from using the itkBinaryMaskToNarrowBandPointSetFilter on an itkSpatialObject, which in this case was an ellipse. The functions go through each point and calculate the normal based on the shape being roughly a circle and taking a ray from the center going through a perimeter point. The resulting direction is stored in a float array as a point that is then normalized to a unit vector. This approach seems to work well if the shape is a circle. In the case of other shapes, the normals cannot be found so easily. Another method is to calculate the normals based on looking at points to the left and right of the point in question. Then find a line that goes through those two points and use a line perpendicular to it that goes through the center point to be the normal direction. This method would be difficult in the point set implemented thus far because the points resulting from the itkBinaryMaskToNarrowBandPointSetFilter are not uniformly spaced around the border. Because of the way the points are placed, in some cases two points on the same normal vector, this method would only work if the point set were constructed more carefully. Reducing the width of the filter causes there to be empty areas in the border that would not work effectively. Creating the ellipse by using equations to map out the desired region seems like it could also be one solution.&lt;br /&gt;&lt;br /&gt;Aside from the creation of the point set normals, their incorporation into the registration will require either adding them to a point set class as an inherited class, or having them as a separate object. There will also need to be an efficient way to transform the normals that could work interchangeably with the various transforms. Those tools could be a part of the new point set class.&lt;br /&gt;&lt;br /&gt;I was unable to get the program that the meshes are fed into to calculate the normals to work on my computer. Errors seem to be stemming from the inclusion of "argtable" into the program. I tried installing an rpm of the program from the Internet but get the error "Missing Dependency: linux-gate.so.1 is needed by package argtable2". However, "linux-gate.so.1" is supposedly a virtual library and cannot be installed. It may have something to do with where the install is looking for it. In my case since I am calculating the normals this issue is not as critical.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115767452560286754?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115767452560286754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115767452560286754' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115767452560286754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115767452560286754'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/09/calculating-normals.html' title='Calculating Normals'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115566933751355667</id><published>2006-08-15T11:54:00.000-07:00</published><updated>2006-11-14T21:51:44.055-08:00</updated><title type='text'>Tweaking The Registration</title><content type='html'>&lt;div style="text-align: justify;"&gt;To improve the performance of the Image Registration process, I have added various changes in its structure and implementation. The addition of a user selectable blurring option was included in hopes of smoothing out the optimizer's path. I have been running the itkBinomialBlurImageFilter at twenty iterations, providing an image with its borders slightly blurred. The point set that represents the ellipse has also been shrunk to a smaller band size. Reducing the size of the ellipse band has made the metric more sensitive to every perturbation. It has resulted in the metric being very choppy. I have implemented the Registration in steps, first the translation, then the angle, and finally translation again. The first translation is allowed to move freely, with the optimizer starting at the ability to jump thirty pixels. After this is run the coordinates of the ellipse are usually in roughly the correct position. Then I run a second Registration where the angle is the parameter in question. Once that is completed, I run a third where the translation is again computed, but this time allowed an initial movement of just two pixels. This has allowed for the ability to fine tune a rough set of parameters gradually and incrementally. Although one pervasive issue throughout the process is the vacillating of the metric. It consistently is very unstable in both the translation and orientation processes.&lt;br /&gt;&lt;br /&gt;The following is a movie of the Registration process:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=6552176072110785809&amp;hl=en" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL"  FlashVars="playerMode=embedded"&gt; &lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115566933751355667?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115566933751355667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115566933751355667' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115566933751355667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115566933751355667'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/tweaking-registration.html' title='Tweaking The Registration'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115534224540223821</id><published>2006-08-11T16:57:00.000-07:00</published><updated>2006-11-14T21:51:43.963-08:00</updated><title type='text'>Graphical Transformation Of Points</title><content type='html'>&lt;div style="text-align: justify;"&gt;Today I completed the implementation of the graphical transformation of the points that represent the ellipse in the Registration process I am currently using. The ellipse is a simple itkSpatialObject that can be used to represent the outline of the brain. In my previous Registration, the ellipse fit the brain exactly in size but was placed a few pixels away from the correct location. Thus the process of the Registration only focused on the translation of the points. Now, I have added functionality by using the itkSimilarity2DTransform which contains scaling, rotation, and translation. Previously I had loaded all the points from the ellipse into a vtkPolyData object and used a vtkActor and vtkPolyDataMapper to display the ellipse. To represent the effects of translation I created a function designed to move the vtkActor with respect to the different locations outputted from the Registration process. This was done by simply changing the position settings on the desired actor. To take into account all the aspects of the itkSimilarity2DTransform, I needed to transform the set of points to new locations in space. This was accomplished by instantiating a new transform object with the parameters from the current iteration. Using that, I transformed each point before I placed it into the vtkPolyData object and then reloaded the object into its respective actor. These additional computations did not noticeably reduce the speed of the Registration process. With the transform implemented I no longer needed to access the coordinates of the translation in the display function, since the positioning of the object was already taken care of within the transform.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;The results of the Registration using the itkSimilarity2DTransform varied. At times, using initial conditions where the translation was displaced twenty-five pixels with a rotation of fifteen degrees, the end of the registration would find itself within five pixels of the correct transformation. Other times the  Registration would end abruptly having made not significant strides into the correct direction. I tried blurring the image using itkBinomialBlurImageFilter, which provided some improvement. If scaling is allowed to vary greatly, the registration process basically stands still and makes no progress. I will probably try to register each aspect of the transformation in succession and use different degrees of blurring.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115534224540223821?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115534224540223821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115534224540223821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115534224540223821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115534224540223821'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/graphical-transformation-of-points.html' title='Graphical Transformation Of Points'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115525461043971050</id><published>2006-08-10T17:02:00.000-07:00</published><updated>2006-11-14T21:51:43.856-08:00</updated><title type='text'>Movie Of Registration</title><content type='html'>&lt;div style="text-align: justify;"&gt;A copy of the Registration process movie can be found &lt;a style="color: rgb(255, 0, 0);" href="http://www.jakelippman.com/reg.mpg"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To construct a movie of the Registration process I implemented the vtkWindowToImageFilter that would take the output of the renderer and convert that to the VTK image type. Using the image type as the input to vtkTIFFWriter I was able to create a series of images that represented each succeeding step in the registration process. Then, to turn those images into a movie I used the "convert" command which comes with the ImageMagick suite and should be available with most versions of linux. I used the command "convert *.tif reg.mpg" to create the movie but came upon the error: Delegate failed `"mpeg2encode" "%i" "%o". I resolved the problem by finding that the converter lacked the required codecs to encode the MPEG movie and added them using the following commands:&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;wget ftp://ftp.mpegtv.com/pub/mpeg/mssg/mpeg2vidcodec_v12.tar.gz&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;tar xvzf mpeg2vidcodec_v12.tar.gz&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;cd mpeg2&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;make&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;cd src/mpeg2dec&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;cp mpeg2decode /usr/local/bin&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;cd ../mpeg2enc&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);font-size:85%;" &gt;cp mpeg2encode /usr/local/bin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;For viewing the MPEG movies the Berkeley MPEG Player worked well since it was really easy to set up. My initial movies were much too fast to be useful. To alleviate this issue I constructed a movie using three images depicting the same information for each iteration. This allowed the movie to proceed at a slower pace.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115525461043971050?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115525461043971050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115525461043971050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115525461043971050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115525461043971050'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/movie-of-registration.html' title='Movie Of Registration'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115516644236626952</id><published>2006-08-09T15:58:00.000-07:00</published><updated>2006-11-14T21:51:43.759-08:00</updated><title type='text'>vtkXYPlotActor Working</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/full.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/400/full.jpg" alt="" border="0" /&gt;&lt;/a&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The above is a snapshot of the final iteration in the Registration process that features the now working vtkXYPlotActor and all my previous implementation of the point set and the brain image registration.&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;br /&gt;I was finally able to get vtkPlotActor to work properly. The problem was in the ordering of the linked libraries in the CMakeLists.txt file that is used by CMake. It seems that if a library is listed last, then anything dependent on it will not be able to define itself properly. Another issue could have been that certain objects were being defined multiple times to further cause errors. So once I was able to remove all the 'undeclared reference' errors I could then begin experimenting with what the vtkXYPlotActor was capable of doing. It seems to be a very versatile class with the ability for the axes to be scaled to whatever a user designated or for it to automatically compensate for the appropriate amount of space for the points. Using these tools, I can scale the y-axis whenever there are points that overreach a certain boundary. The class also contains incremental labels for both axes where the user can specify a number that the class will try to adhere. There is also infrastructure to allow for the separate coloring of the labels and the lines. The input of the graph is in the form of a vtkPolyData object where the scalars are the values for each of the y-axis points. So when plotting, it will take the scalars as the y-points and the point number in the data structure as the x-points. Compared to actually building a vtkPolyData object using points, cells, scalars, and connections between points, this is much easier. I was also able to fit it in nicely into my real time registration structure by simply reloading the vtkPolyData every iteration.&lt;br /&gt;&lt;br /&gt;Now that these steps have been completed, I am beginning to try to figure out how to introduce the ability to scroll through the x-axis. Basically, be able to increase the length of the graph in the x direction but still have it be contained in the same space. This may be possible by introducing the VTK widgets that allow for user control of certain aspects of the graphics. The other step is to be able to transform the set of points in the registration and then display them. In the metric, this is done one point at a time and that may be the only way. Because of all this added computation, the registration process may turn out to be very slow.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115516644236626952?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115516644236626952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115516644236626952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115516644236626952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115516644236626952'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/vtkxyplotactor-working.html' title='vtkXYPlotActor Working'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115502044815501201</id><published>2006-08-07T23:51:00.000-07:00</published><updated>2006-11-14T21:51:43.674-08:00</updated><title type='text'>Additions To vtkGraph</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have now added text into my graph implementation using the vtkTextMapper class. It seems to work very well for the purpose with the ability to change the color and size easily, it even has functions that enable the text to be centered to allow for the appropriate format of the text even if the content changes. One difficulty with this class was using its orientation function that allows for the change of the angle of the text by specifying the desired orientation in degrees. When I tried to edit this there was no apparent result. I had planned to display the y-axis label vertically using this function. Now that the labeling has been pretty much completed, I had moved onto the axis that I first tried to display using vtkAxisActor2D, but I have had a terrible time trying to get it to display. The other solution would be to use vtkLine to create the axis. As far as the scaling of the y-axis was concerned, I plan to scale all of the points by a certain amount every time the points reach an upper boundary.&lt;br /&gt;&lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;br /&gt;The vtkXYPlotActor itself has much of the functionality that I am trying to recreate. To alleviate some of the issues that I have been having with it to get it to work with Linux I have declared some of the undeclared referenced classes in the calling program and that has helped with many of the errors. Then I came upon difficulties with the vtkMapper2D that I am having trouble declaring properly. It seems that the problem stems from some of the libraries in VTK are not being declared properly in the context of this class. I tried recompiling VTK with turning off the shared libraries and setting the path name correctly but neither seemed to help.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115502044815501201?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115502044815501201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115502044815501201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115502044815501201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115502044815501201'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/additions-to-vtkgraph.html' title='Additions To vtkGraph'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115476001938075504</id><published>2006-08-04T23:20:00.000-07:00</published><updated>2006-11-14T21:51:43.598-08:00</updated><title type='text'>Graph Using vtkXYPlotActor</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/vtkgraphout.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/320/vtkgraphout.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p style="text-align: justify;" class="MsoNormal"&gt;The preceding graph was made using the VTK class vtkXYPlotActor. It is able to represent the points as a line and has a nice way to label the axis. The problem is that I was only able to get the class working in Windows. In Linux the compiler would complain every time it would start linking, I am not sure why it is doing that so I have been taking elements from this graph and putting them into my own graph class. The labels suit the purpose very well in that they are much clearer then using a .png file for the background. One issue with it is that it uses the vtkAxisActor2D, and by looking at the above graph it can readily be seen that it is not working properly. The areas where the label is "HPQ" should be the value of the position at that point in the axis. When I tried using the class alone it would not even display properly. This class, if it does what it purports to do, would save a great deal of time in creating my graph class.&lt;br /&gt;&lt;br /&gt;Once these problems have been solved, I can start working on making the desired points into a vtkDataSet that is the input the line would take. Either points or a smooth line can represent the line. These specific graphs classes seem to be less robust then the other more standard VTK classes and it might be due to being platform dependant or the classes it depends on being altered as VTK has been updated.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115476001938075504?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115476001938075504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115476001938075504' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115476001938075504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115476001938075504'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/graph-using-vtkxyplotactor.html' title='Graph Using vtkXYPlotActor'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32147528.post-115464372909306590</id><published>2006-08-03T14:56:00.000-07:00</published><updated>2006-11-14T21:51:43.508-08:00</updated><title type='text'>Creating A Two-Dimensional Plot</title><content type='html'>&lt;div style="text-align: justify;"&gt;I am now starting to create a class that will visualize a two-dimensional graph using the VTK interface. VTK itself comes with a class that supposedly has a good deal of the functionality that I am trying to create but I have yet to get it to work. Currently I have a basic class created that will display a graph given points, but the background is a .png file which has to be drawn by hand specifically for the data set that will be used for the graph. One aspect that separates my class from the one available in the VTK setup is the ability to display the graph point by point which can be used to create a movie of the graph creation in real time. This is helpful in the process of registration where the parameters are being computed on the fly and the visual interface serves to show how the results are changing.&lt;br /&gt;&lt;br /&gt;With the new 2DGraph class that I am creating, I am also looking to add the functionality of having the ability to scale itself in the y-direction if the points are specified at locations above the limit. Another addition would be the ability to scroll in the x-direction and have a grid in the background. One issue with implementing these things is the fact that the resolution of the objects being displayed is so low. This causes problems with labels being unclear and the lack of detail that can be implemented. To assist in these goals I am trying to milk some of the functionality of the vtkXYPlotActor that is provided but so far, it has been difficult to get it up and running. The VTK documentation does provide one example piece of code that was written in python, I converted it to C++ but was still unable to get it to run due to problems with the vtkXYPlotActor itself not being able to compile because of "undeclared references" to the initiation of certain objects.&lt;br /&gt;&lt;br /&gt;Below is a picture of the graph interface that I have implemented so far.&lt;/div&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/149/3508/1600/GraphClassOut.2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/149/3508/320/GraphClassOut.2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32147528-115464372909306590?l=gpjaz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gpjaz.blogspot.com/feeds/115464372909306590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32147528&amp;postID=115464372909306590' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115464372909306590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32147528/posts/default/115464372909306590'/><link rel='alternate' type='text/html' href='http://gpjaz.blogspot.com/2006/08/creating-two-dimensional-plot.html' title='Creating A Two-Dimensional Plot'/><author><name>Gautam Prasad</name><uri>http://www.blogger.com/profile/08875679780624951203</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
