Monday, November 30, 2009

Copenhague: L'Ultimatum Climatique

Le lien pour signer la petition:


I was recently involved in a thread on ITK mailing list, where it was discussed the use of LC_NUMERIC. In DICOM it is very important to write floating point number in C-style format.

At first I thought I could test using:

well in fact it is much more complex:

Now I can setup test to check whether GDCM is LC_NUMERIC independant or not !


I was looking for documentation on how to secure a debian server and found out those links:


Which leads to :


So on my debian 5.0 system, I had to install the testing for bastille:

$ sudo apt-get install -t testing bastille

which leads to:

$ apt-cache policy bastille
Installed: 1:3.0.9-12
Candidate: 1:3.0.9-12
Version table:
*** 1:3.0.9-12 0
200 testing/main Packages
100 unstable/main Packages
100 /var/lib/dpkg/status
1:2.1.1-19 0
500 lenny/main Packages

Now to get is working with X interface, you have to:

$ sudo su -
$ InteractiveBastille

If you get an error for you stimply need to:

$ apt-get install perl-tk

Cheers !

Sunday, November 29, 2009

vimdiff DICOM files

autocmd BufReadPre *.dcm set ro
autocmd BufReadPre *.dcm set hlsearch!
autocmd BufReadPost *.dcm silent %!dcmdump "%" -

error: Unable to find hp-toolbox on PATH.

Ok, I am giving up. I cannot get hplip to work from unstable.

Let's hope reverting to testing is ok.

Boot Debian from an USB device

I have been struggling for the past days to prepare a USB Key for booting up debian. I was reading:

Well the important part is :

# zcat boot.img.gz > /dev/sdX

This is completely different from:

# zcat boot.img.gz > /dev/sdX1

One is writing to the disk (create the partition at the time), while the other one is simply copying to the 1st partition.

BTW, there is also a good link that never showed up on my google search:

Friday, November 27, 2009

password-stores = keychain on MacOSX

On your MacOSX., have a setup such that:

$ cat .subversion/config
password-stores = keychain

$ cat .subversion/servers
store-passwords = yes
store-plaintext-passwords = no

If you have any svn.simple directory make sure to delete it first. You should be all set.

See my post at:

Wednesday, November 25, 2009

You want the best from GDCM, but are you are using Activiz ? Well take the best from both.
You can now use GDCM directly from C# using the Activiz framework !

This image was a screenshot of:

$ mono ./bin/HelloActiviz3.exe ~/Creatis/gdcmData/012345.002.050.dcm


There are no availible options for this view.

Since a few days the viewvc software installed on is displaying this funky message:

"There are no availible options for this view. "


Patching nvidia-graphics-drivers

I finally took the time to work on the issue that has been killing me from the begining. I could not switch away from my DisplayPort otherwise my monitor would enter in Power Save mode.

See my post:

Yesterday I finally found this post:

And today I decide to get my hand at patching the nvidia-graphics-drivers debian package. See my patch at:

I simply had to dpkg -i install the kernel source, then I followed my own instructions:

I did the module-assistant dance ... it worked out nicely !

I can finally switch to my mac mini on DVI and then back to my debian station on DisplayPort.


Tuesday, November 24, 2009

Doing UTF-16 on Win system

Conventional wisdom is retarded, aka What the @#%&* is _O_U16TEXT?

Educate to Innovate

From the white house:

Monday, November 23, 2009

Installing CMake on MacOSX from the command line

I did not want to following instructions from:

as it painful from an admin point of view. Instead using macports this was a no-brainer:

$ sudo /opt/local/bin/port -v selfupdate
---> Updating the ports tree
Synchronizing local ports tree from rsync://
receiving file list ... done

sent 36 bytes received 417227 bytes 119218.00 bytes/sec
total size is 29398873 speedup is 70.46
---> Updating MacPorts base sources using rsync
receiving file list ... done

sent 36 bytes received 6869 bytes 2762.00 bytes/sec
total size is 4021380 speedup is 582.39
MacPorts base version 1.8.1 installed,
MacPorts base version 1.8.1 downloaded.
---> MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated

$ sudo /opt/local/bin/port install boost
---> Computing dependencies for boost
---> Fetching boost-jam
---> Attempting to fetch boost-jam-3.1.17.tgz from
---> Verifying checksum(s) for boost-jam
---> Extracting boost-jam
---> Applying patches to boost-jam
---> Configuring boost-jam
---> Building boost-jam
---> Staging boost-jam into destroot
---> Installing boost-jam @3.1.17_0
---> Activating boost-jam @3.1.17_0
---> Cleaning boost-jam
---> Fetching bzip2
---> Attempting to fetch bzip2-1.0.5.tar.gz from
---> Verifying checksum(s) for bzip2
---> Extracting bzip2
---> Applying patches to bzip2
---> Configuring bzip2
---> Building bzip2
---> Staging bzip2 into destroot
---> Installing bzip2 @1.0.5_3+darwin
---> Activating bzip2 @1.0.5_3+darwin
---> Cleaning bzip2
---> Fetching zlib
---> Attempting to fetch zlib-1.2.3.tar.bz2 from
---> Verifying checksum(s) for zlib
---> Extracting zlib
---> Applying patches to zlib
---> Configuring zlib
---> Building zlib
---> Staging zlib into destroot
---> Installing zlib @1.2.3_3
---> Activating zlib @1.2.3_3
---> Cleaning zlib
---> Fetching boost
---> Attempting to fetch boost_1_41_0.tar.bz2 from
---> Verifying checksum(s) for boost
---> Extracting boost
---> Applying patches to boost
---> Configuring boost
---> Building boost
---> Staging boost into destroot
---> Installing boost @1.41.0_0
---> Activating boost @1.41.0_0
---> Cleaning boost
Installing macport

$ curl -O
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 431k 100 431k 0 0 148k 0 0:00:02 0:00:02 --:--:-- 209k
dhcp-67-178:Software mathieu$ hdiutil attach ./MacPorts-1.8.1-10.6-SnowLeopard.dmg
Checksumming Protective Master Boot Record (MBR : 0)…
Protective Master Boot Record (MBR :: verified CRC32 $3A3AE94A
Checksumming GPT Header (Primary GPT Header : 1)…
GPT Header (Primary GPT Header : 1): verified CRC32 $CA2CC8A2
Checksumming GPT Partition Data (Primary GPT Table : 2)…
GPT Partition Data (Primary GPT Tabl: verified CRC32 $395B8734
Checksumming (Apple_Free : 3)…
(Apple_Free : 3): verified CRC32 $00000000
Checksumming disk image (Apple_HFS : 4)…
disk image (Apple_HFS : 4): verified CRC32 $260D55ED
Checksumming (Apple_Free : 5)…
(Apple_Free : 5): verified CRC32 $00000000
Checksumming GPT Partition Data (Backup GPT Table : 6)…
GPT Partition Data (Backup GPT Table: verified CRC32 $395B8734
Checksumming GPT Header (Backup GPT Header : 7)…
GPT Header (Backup GPT Header : 7): verified CRC32 $E963A641
verified CRC32 $1EEE11CE
/dev/disk4 GUID_partition_scheme
/dev/disk4s1 Apple_HFS /Volumes/MacPorts-1.8.1

$ cd /Volumes/MacPorts-1.8.1

$ sudo installer -pkg MacPorts-1.8.1.pkg -target /
installer: Package name is MacPorts-1.8.1
installer: Installing at base path /
installer: The install was successful.

$ sudo port -v selfupdate
sudo: port: command not found

Hum looks like my .profile was not copied as expected (*)


SVN and clear password

I could just not setup a regular cmake/ctest environment on a dashboard machine as our svn server had no anonymous user. I could not just use my username+password everywhere either.

It looks like now this is possible on Win32, MacOSX and finally most UNIX system:

Yeah !

Installing CMake on MacOSX from the command line

I thought I could just :

curl -O

hdiutil attach cmake-2.8.0-Darwin-universal.dmg

cd /Volumes/cmake-2.8.0-Darwin-universal

sudo installer -pkg cmake-2.8.0-Darwin-universal.pkg -target /

Oh well ... it still starts up a message box, where you have to click, yes I want the /usr/bin cmake symlink.

D'oh !

Saturday, November 21, 2009

nVidia on debian

First thing first:

$ vim /etc/apt/sources.list

deb lenny main contrib non-free
deb-src lenny main contrib non-free

deb lenny/updates main contrib non-free
deb-src lenny/updates main contrib non-free

$ sudo apt-get update

$ sudo apt-get install module-assistant

$ sudo m-a prepare

$ sudo m-a update

$ sudo m-a a-i nvidia

By now something should have gone wrong (*), so now fix it by using the nvidia driver from unstable:

$ sudo apt-get install -t unstable nvidia-kernel-source

Don't forget to remove old stuff

$ sudo apt-get remove nvidia-glx

Yeah for some reason driver for kernel 2.6.26-2-686 was pulled while uname returned: 2.6.30-bpo.1-686

So again clean it up:

$ sudo apt-get remove nvidia-kernel-2.6.26-2-686

Remove any old compilation binaries:

$ sudo m-a clean nvidia

Same player:

$ sudo m-a a-i nvidia

You should be all set now !

Now you can install

$ sudo apt-get install -t unstable nvidia-glx-dev


Thursday, November 12, 2009

Uploading file to is broken

I am following the instructions from:

So this give:

$ rsync -e ssh GDCM-2.0.14-Linux-x86_64.tar.bz2 GDCM-2.0.14-Linux-x86_64.tar.gz gdcm-2.0.14.tar.bz2 gdcm-2.0.14.tar.gz "malat, 2.x/GDCM 2.0.14"
ERROR: destination must be a directory when copying more than 1 file
rsync error: errors selecting input/output files, dirs (code 3) at main.c(600) [receiver=3.1.0dev]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

this is not working, I had to do:

$ sftp malat,
sftp> put GDCM-2.0.14-Linux-x86_64.tar.bz2
Uploading GDCM-2.0.14-Linux-x86_64.tar.bz2 to /home/pfs/project/g/gd/gdcm/gdcm 2.x/GDCM 2.0.14/GDCM-2.0.14-Linux-x86_64.tar.bz2
GDCM-2.0.14-Linux-x86_64.tar.bz2 100% 2876KB 1.4MB/s 00:02
sftp> put GDCM-2.0.14-Linux-x86_64.tar.gz
Uploading GDCM-2.0.14-Linux-x86_64.tar.gz to /home/pfs/project/g/gd/gdcm/gdcm 2.x/GDCM 2.0.14/GDCM-2.0.14-Linux-x86_64.tar.gz
GDCM-2.0.14-Linux-x86_64.tar.gz 100% 3215KB 1.6MB/s 00:02
sftp> put gdcm-2.0.14.tar.bz2
Uploading gdcm-2.0.14.tar.bz2 to /home/pfs/project/g/gd/gdcm/gdcm 2.x/GDCM 2.0.14/gdcm-2.0.14.tar.bz2
gdcm-2.0.14.tar.bz2 100% 2537KB 1.2MB/s 00:02
sftp> put gdcm-2.0.14.tar.gz
Uploading gdcm-2.0.14.tar.gz to /home/pfs/project/g/gd/gdcm/gdcm 2.x/GDCM 2.0.14/gdcm-2.0.14.tar.gz
gdcm-2.0.14.tar.gz 100% 3319KB 1.6MB/s 00:02
sftp> ^D

Sigh, this is an admin worse nightmare...

Private DICOM dictionary

Looking at the private dictionary for pydicom:

It says:

# Generates output from a file from the MDCM project (,

The only issue is that mdcm is LGPL, while pydicom claims to be MIT... There is a clear conflict of license here.

So I filled in a bug report:

I cannot believe they prefered to used the dictionary from mdcm, instead of using the easy-to-parse XML dictionary from GDCM

oh well...

Sunday, November 8, 2009

2012: la fin du monde ?

Pas si sur, ca serait plutot 2220, d'apres cet article:


Postfix Gmail SMTP Relay

I was trying to setup postfix to relay email to my gmail account and found out:

which is working, compared to a skrewed solution like:


HAL Keymap Quirks

Today trying to start the wifi I discover things were not working as expected. Check this thread:

So searching on the net for:

[ 446.068109] atkbd.c: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
[ 446.068117] atkbd.c: Use 'setkeycodes e008 ' to make it known.

reveal this bug report on debian:

Which lead to this page:

Bad luck, this is not working anymore and there is no redirect. Using web.archive I found this page:

Searching for keywords on this page, reveal that this page has moved to:

Pheeww.... that was hard !

Tuesday, November 3, 2009

a.vim : Alternate Files quickly

There is a very cool vim script a.vim:

However this script is really poorly documented, so I spend half an hour just to figure out how to add a special extension.


let g:alternateExtensions_txx = "hxx,h,hh"

Well now how about t++ -> h++ ? Look easy, try it yourself !


:so $HOME/.vim/plugin/a.vim
let g:alternateExtensionsDict['t++'] = "h++"