Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Thursday, December 30th, 2010, 4:07 pm

Porting Code From Octave to MATLAB (or Vice Versa)

MATLAB and QtOctave
QtOctave on Kubuntu with a
MATLAB window imported from Fedora over SSH

For the sake of cross-application/framework compatibility, one occasionally needs to alter code until it works everywhere, without the need to keep two (or more) separate codebases. This situation is far from ideal, but then again, not everything works like Java. When colleagues use a different platform and occasionally prefer proprietary software it is only fair to do some extra work catering for it.

In a matter of days or maybe a few weeks I will have some new code ready for release. I had already released this before it was ready for stable usage, partly because I had not set up a proper repository, so each release of code become a manual process. This may change soon.

In the early part of the day I ensured my programs work in both MATLAB and Octave. It was not as trivial as I had expected because there is certain functionality in Octave which MATLAB simply does not support. There are notes that I took to summarise and thus simplify this task in the future. The code now works in the latest MATLAB and also in Octave, with very minor differences between these two. The same set of files can be used for both, interchangeably.

Over the course of my work I have organised the data, documentation, experimental results, and code. All of these can be neatly packaged to provide the tools necessary for others to extend the program and use it to run more experiments. Following a very thorough survey of programs that are already available around the Web, it does not appear as though opportunities to reuse code were missed. At the moment, the program has an interface function with clearly-defined inputs and its output — in the form of images and video — is sent to a directory of choice at the end.

What would be nice to attempt next is implementation of other methods that assess similarity between regions, as means of selecting points more accurately. Making the placement of points diffeomorphic so that nothing gets folded or torn between the connecting curves that make up the contours would be essential too, especially for visualisation and 3-D reconstruction for example. At the moment it is possible to take point positions at each slice and each of the 20 iterations contained for that slice and then produce — using polygons — a sort of 3-D model of the heart. This, however, would require results to be of higher precision too.

Tuesday, December 28th, 2010, 11:40 pm

In-depth Exploration of the QtOctave GUI

THIS fourth video in tonight’s series looks more closely at some of the different components of QtOctave.


Tuesday, December 28th, 2010, 11:07 pm

Overview of QtOctave in GNU/Linux

WITHOUT preparation I’ve just created another video that can hopefully introduce new users to QtOctave, which is an excellent program.


Before we get to the essence of programming with the toolboxes as well as basic syntax, there ought to be a proper introduction to each component in QtOctave, which simplifies Octave by wrapping it with a GUI.

Tuesday, December 28th, 2010, 10:22 pm

Tutorial: Installing GNU Octave in GNU/Linux

WITHOUT preparing any notes I’ve embarked on the task of making this first Octave tutorial, which hopefully helps show how to install it on a Debian- or Red Hat-based system.


Please bear in mind that this was done on the spot without rehearsals and future tutorials will hopefully be more organised.

Tuesday, December 28th, 2010, 8:57 pm

My First GNU Octave Screencast

BACK in October I planned to create some videos that explain to people how to use Free (as in libre) software in scientific computing and also how to program with the corresponding syntax. The following unscripted video is an opening demo of what I hope will improve as I gain experience with screencasting. It’s down to figuring out the audio, the window size, and all sorts of intuition-related skills which will be acquired over time.


In later parts I shall introduce readers to QtOctave, as well. I currently experiment with all sorts of video capturing/editing programs and I also upload old videos like this one.

Tuesday, December 28th, 2010, 12:27 am

Closing of a First Year for TechBytes

TechBytes

Direct download as Ogg (1:46:40, 32.0 MB) | Direct download as MP3 (48.8 MB)

Summary: Tim, Gordon, and Roy speak about games and make their picks of the year (for 2010)

TODAY’S show covers what was missed since last week’s show and OpenBytes has published the show notes with most of the topics and some corresponding links.

RSS 64x64We hope you will join us for future shows and consider subscribing to the show via the RSS feed. You can also visit our archives for past shows. If you have an Identi.ca account, consider subscribing to TechBytes in order to keep up to date.

As embedded (HTML5):

Download:

Ogg Theora
(There is also an MP3 version)

Sunday, December 26th, 2010, 12:33 pm

Search for Cardiac Analysis Code

During the holidays I decided to see what else is out there which is already free/libre software like my own work, which thus can be merged for comparative purposes. It would be valuable to have applied to my work some comparison to existing tracking algorithms which deal with cardiac images. A decade-old paper from Osman et al. covers the very popular HARP and states in its abstract that it offers an “image processing technique for rapid analysis of tagged cardiac magnetic resonance image sequences.[...] Results from the new method are shown to compare very well with a previously validated tracking algorithm.” It’s not easy to gain access even to code samples of complete frameworks that facilitate benchmarking, so the search ascended to SourceForge. I uploaded some projects of mine to SourceForge about 8.5 years ago and hoped that others would do the same. A search in SourceForge for “cardiac” yields about a dozen results (at the time of writing), but there are empty entries in the code repositories where there ought to be complete projects. The Cardiac MR toolbox for Matlab, for instance, is an empty project:

[roy@blueberry cmr-toolbox]$ svn co
https://cmr-toolbox.svn.sourceforge.net/svnroot/cmr-toolbox cmr-toolbox
Checked out revision 0.
[roy@blueberry cmr-toolbox]$ ls
cmr-toolbox
[roy@blueberry cmr-toolbox]$ cd cmr-toolbox/
[roy@blueberry cmr-toolbox]$ ls
[roy@blueberry cmr-toolbox]$

The same goes for Neonatal Rat Cardiac Action Potential, but the Evaluation of Cardiac MR Segmentation project (all of them written for MATLAB but ought to be compatible with Octave) contains some LGPL-licensed code. Repository access (SVN):

svn co https://cardiac-mr.svn.sourceforge.net/svnroot/cardiac-mr cardiac-mr

Looking at MATLAB Central for some more existing code I find an old BSD-licensed function but almost nothing else when searching for “Cardiac”. Since the literature review phase and the subsequent finding of some data [1, 2, 3] there has been almost no room for code reuse, so I had to code everything from scratch. I will soon publish the code (GPLv3-licensed), but in a more scientific society more code would have already been out there for others to collaborate and build upon the work of others.

Real-time Posts

Posts by @schestowitz

Retrieval statistics: 23 queries taking a total of 0.131 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|