Archive for the ‘technology’ Category

iReadmammo : easy DB source / DICOM node config

Sunday, January 4th, 2009

Cedara iReadmammo (now Merge Mammo) is a DICOM viewer geared towards mammography reading. By default, the data source you use for reading is the local machine, but you can add others — and you can set up various DICOM nodes so it can transfer images between various studies. One big issue is that it is not promiscuous for transfers, so if the other machine doesn’t know about you, you can’t transfer. Actually, since the Query/Retrieve tool allows both a source and destination different than the local machine, you can use iReadmammo for transfer between two other machines.. As long as all three of them know each other.
This script attempts to make life a little easier when first setting up the machine, by parsing two YAML config files (one for DB source, one for DICOM nodes) and adding them automatically. As an added bonus, there is the option of adding the new machine to remote hosts and scheduling a task to run at midnight to stop and restart the scriptservice (so the software reads the config again).
It requires the files ‘ireadmammo_hosts.yml’ (for Datasources) and ‘DCconfig.yml’ (for DICOM nodes), and if they don’t exist in the same directory as the script, it’ll offer to create them for you and allow you to configure them.
Error-checking is a little spotty, as I really wanted to finish the script at this point. It’s the biggest thing I’ve written in several years.

(Lexicographic) Permutations in Ruby

Saturday, December 20th, 2008

Taking the code from this other blog … It’s pretty elegant Ruby!

I won’t waste your time repeating what the guy wrote in his blog - you’re welcome to go read it. I just felt that I should help spread a little this elegant implementation of the standard permutation algorithm, fixing a small bug within it in the process.

def permutations li
  if li.length < 2
    yield li
  else
    li.each do |element|
      permutations(li.select() {|n| n != element}) \
        {|val| yield([element].concat << val)}
       end
    end
  end

Ruby HL7

Wednesday, December 17th, 2008

And right on schedule on this blog, behind Ruby DICOM, here comes Ruby-HL7!
Gots to love the Ruby. A lot of potential.. And to think they’re revamping the language.

Ruby DICOM

Tuesday, December 16th, 2008

I am pretty excited about this — a Ruby library to edit DICOM data!

It’s ridiculously geeky but.. Well, that’s what I love about Ruby, it’s got pretty much everything!

Windows Vista : Corrupt user profile

Sunday, December 7th, 2008

I’m taking this from this page but thought I should try to propagate it a little since it took me forever to find it.

Assume in this example that the username is ‘atiensivu’, the domain is ’staff’, and the user profile is located in %systemdrive%\users\atiensivu. %systemdrive% is typically C: on standard Vista installs. Replace every instance ‘atiensivu’ with the username of the corrupt profile.
(more…)

Can You See With Your Tongue?

Monday, December 1st, 2008

Can You See With Your Tongue? | Senses | DISCOVER Magazine.

This is an amazing article - a scientist who managed to make people react to light-based input without using their eyes. The human brain is … limitless within its limits ? It’s definitely worth the read.

WinWget - wget for Windows

Monday, November 24th, 2008

WinWget on Lifehacker

Very handy graphical download tool.

MIMVista and auto-deletion of archived studies

Tuesday, November 4th, 2008

The MIM keeps 60 days by default. That may be too much for you..

By default, the folder C:\Program Files\MIM\config should make you really happy, it’s got lots of plain text files with configuration for all kinds of settings.

cleanup.txt has “ARCHIVE LEFTOVER AGE (DAYS) := 60

Change that to whatever you feel is appropriate for you needs.

How to delete all files older than a day recursively in a directory and its subdirectories

Tuesday, November 4th, 2008

Whoo! I haven’t done a post that long in a while! Also makes me think I should get a wordpress plugin for some ‘code’ tags..

I put ‘activerecord’ in there to take advantage of the ‘24.hours.ago’ notation, which makes life much easier. The cost is a little less than 2 seconds to load the library, so I think it’s worth it. It runs as a daily job before backup to tape, to clear old backups from the directory tree.

require 'activerecord'

def delete_recursively(in_here)
  Dir.chdir(in_here)
  Dir.glob('*') do |filename|
    if File.directory?(filename)
      delete_recursively(filename)
      else
        if File.mtime(filename) > 24.hours.ago
        File.delete(filename)
      end
    end
  end
Dir.chdir('..')
end

delete_recursively("your/path/here")

First entry from Blackberry

Tuesday, November 4th, 2008

This blog may yet come alive! I’ve figured out how to post to this from my Blackberry :) I use an app called bbmetablog (google for ‘bbmetablog opencod’), currently version 1.2.2 . I had a bit of an issue getting xmlrpc line set up propery, until I changed their default ‘xml-rpc?openagent’ to ‘xmlrpc.php’ .. And I’m live!