{"id":135,"date":"2008-08-23T17:56:35","date_gmt":"2008-08-24T00:56:35","guid":{"rendered":"http:\/\/prefrontal.org\/blog\/?p=135"},"modified":"2026-03-06T13:28:46","modified_gmt":"2026-03-06T20:28:46","slug":"new-software-hrfun-os-x","status":"publish","type":"post","link":"https:\/\/prefrontal.org\/blog\/2008\/08\/new-software-hrfun-os-x\/","title":{"rendered":"New Software: HRFun (OS X)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/prefrontal.org\/blog\/wp-content\/uploads\/2008\/08\/hrfun3.jpg\" alt=\"\" title=\"hrfun3\" width=\"198\" height=\"212\" align=\"right\">I have been spending a fair amount of time learning the Objective-C programming language lately.  While I spend most of my time in Matlab, I am thinking about writing some Mac OS X applications in the future.  For those of you who are looking to do the same I can highly recommend the Aaron Hillegass book &#8220;<a href=\"http:\/\/www.amazon.com\/Cocoa-Programming-Mac-OS-3rd\/dp\/0321503619\/\">Cocoa Programming for Mac OS X<\/a>&#8221; as a good way to get started.  I will go into the learning Objective-C in another post, but wanted to take a second to announce the first complete fruit of my learning labor: <a href=\"http:\/\/prefrontal.org\/wiki\/index.php\/HRFun\">HRFun<\/a>.<\/p>\n<p>HRFun is a small Cocoa application that allows a user to explore the construction of a canonical <a href=\"http:\/\/en.wikipedia.org\/wiki\/Haemodynamic_response\">hemodynamic response<\/a> from the summation of two <a href=\"http:\/\/en.wikipedia.org\/wiki\/Gamma_function\">gamma functions<\/a>.  This is the method used by the Statistical Parametric Mapping (<a href=\"http:\/\/www.fil.ion.ucl.ac.uk\/spm\/\">SPM<\/a>) folks to model what happens in the brain when a stimulus is applied.  For instance, if I show a brief flashing checkerboard pattern to a subject while conducting functional MRI then areas of visual cortex would have signal changes similar to the canonical HRF.  I was curious about how varying the parameters of the gamma functions would change the predicted hemodynamic response, so I created this application that lets me vary any parameter I want.<\/p>\n<p>It&#8217;s not a terribly useful app, but for those who are curious to learn more about the SPM construction of a canonical HRF it can be a useful tool.  HRFun is my first OS X application to be released, so there are probably some inefficiencies and bugs in the code.  Still, I have been diligent to test the software out and smooth the rough edges.  Also, the source code has been released under the GPL.  So, if you need an Objective-C class to create a hemodynamic response you&#8217;re in luck!<\/p>\n<p>Let me know what you think &#8211; positive or negative.  This is a learning project, so any feedback is appreciated.  My next goal is to figure out how to load an fMRI timeseries &#8211; then the real fun begins.<\/p>\n<p>HRFun wiki page: <a href=\"http:\/\/prefrontal.org\/wiki\/index.php\/HRFun\">http:\/\/prefrontal.org\/wiki\/index.php\/HRFun<\/a><\/p>\n<p><a href=\"http:\/\/prefrontal.org\/wiki\/index.php\/HRFun\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/prefrontal.org\/blog\/wp-content\/uploads\/2008\/08\/hrfun2.jpg\" alt=\"\" title=\"hrfun2\" width=\"490\" height=\"271\" align=\"center\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been spending a fair amount of time learning the Objective-C programming language lately. While I spend most of my time in Matlab, I am thinking about writing some Mac OS X applications in the future. For those of you who are looking to do the same I can highly recommend the Aaron Hillegass [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,10],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-cognitive-neuroscience","category-mri"],"_links":{"self":[{"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":10,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/posts\/135\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prefrontal.org\/blog\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}