Porting Code From Octave to MATLAB (or Vice Versa)

QtOctave on Kubuntu with a
MATLAB window imported from Fedora over SSH
or 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.






Filed under:
uring 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
eople who say that nothing can replace Photoshop and nothing can replace Microsoft Office simply forget that the functionality they must be implicily referring to is hardly used by anyone among the entire userbase. As pointed out in the 











oday I implemented circular arrangement of landmark points for the algorithm to identify something approximate/similar to the shape of the heart and then place a given number of points around there. In addition, a boundary is shown by sampling between those points, which gives a contour, with or without arrows on top of it. I will upload the code shortly (needs tidying up).

ather than use the
am not always a pessimist, but I do believe that in order to make positive progress we must concentrare on the illnesses and try to cure them. This is why most of my work at present revolves around advancing collaborative platforms like GNU/Linux (no tyranny on people’s desktops and servers). Sure, companies like Google and IBM make a lot of money out of the platform, but it does not take away from anyone else’s ability to use the same code. Overall, it leads to solidarity. Just watch how many companies jointly develop Linux (kernel space), including giants like AMD, Intel, and NVIDIA, which must play nice with the free graphics stack. A decade ago it was hardly conceivable, but here we are today with some truly powerful applications for GNU/Linux (some are still proprietary, especially games). It is exciting to see desktop environments like the K Desktop Environment (KDE SC) and GNOME desktop becoming highly competitive with whatever else is out there, proprietary included. LXDE and Xfce continue to serve an important role, especially in less capable PCs that rely on light-weight distributions. New releases of GNU/Linux come at a pace of about one per day and diversity continues to exist, with popular branches like the Mandrake/Mandriva family (with several derivatives), the Red Hat family (including Fedora), and the Debian family, which notably includes Ubuntu for the desktops (it has a huge number of variants).