Rob MacLeod
The basic idea of this program was to perform certain corrections and alterations of the geometry files from needle experiments. The need arises for reasons such as electrodes being outside the myocardium, or needles slipping out of the heart over the course of the experiment. The user must select the operations, and the leads which need them, manually as part of routine quality control step. Once selected, the program should read these instructions and perform the corrections, creating a new geometry file from each original.
Cleanleads can be run directly as follows:
cleanleads channel_list.clf inputfile.geom outputfile.geom
where the arguments are specified as
To facilitate running multiple files through cleanleads, shell scripts can also be used, or written for any particular situation. One example of such a script is cleansomeleads.sh, which requires input of the channels list and a list of files to be cleaned. It can be run as follows:
Case 1: specify geom filenames as a list or wildcard, for example,
cleansomeleads channel_list.clf *.geom
would clean all the files with the .geom extension in the current directory.
Case 2: create a list of files to process in another file, for example
cleansomeleads channel_list.clf `cat geomfile_list.flist`
would clean all the files found listed in the file geomfile_list.flist.
Case 3: create a file with the names of the channel_list file and the .geom files in it, for example
cleansomeleads `cat geomfile_list.flist`
would clean all the files in the file geomfile_list.flist in the current directory, using the first filename in the geomfile_list.flist file as the channels_list file.
Note that the cleansomeleads script automatically saves the original .geom file under a new name, and then creates a new one under the original name. The format of the new name may vary but at the moment has ``-orig'' inserted between the filename and the extension (eg., filea.geom becomes filesa-orig.geom).
This file contains all the information the cleanleads program needs to adjust the geometry files. It is a simple ASCII file with the following format:
Line number | Column 1 | Column 2 | Comments |
1 | ncav_channels | Number of channels from leads that are in the cavity or otherwise outside the heart. | |
2 | channnelnum | first channel number | |
3 | channnelnum | second channel number | |
. | . | . | . |
. | . | . | . |
ncav_channels+1 | cav_channel | last channel of cavity potentials | |
ncav_channels+2 | nshift_needles | nelecs_per_needle | Number of needles to be shifted and the number of electrodes on each needle. |
nsteps | channelnum | Channel number at the end of the needle to be shifted and the number of electrode steps to be shift by. | |
nsteps | channelnum | ||
. | . | . | . |
. | . | . | . |
nsteps | last_channelnum | Last needle to be shifted. |
Notes:
The program first reads all surfaces from the geometry file, under the following assumptions:
Once the geometry read in and organized in groups according to the needles, cleanleads performs the following operations:
There always exists the risk that the program could mangle or destroy a file. It is best, especially at this early stage of things, to make copies of the .geom files and work with the copies.
If there are any problems or further additions/changes, and there are bound to be, then see Rob (ideally not before a bike ride and with checkbook in hand).
This document was generated using the LaTeX2HTML translator Version 99.2beta6 (1.42)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 3 -no_white -link 3 -no_navigation -no_math -html_version 3.2,math -show_section_numbers cleanleads
The translation was initiated by Rob MacLeod on 2001-08-05