cathy CLI#

cathy#

Command line tools for processing catheter data.

cathy [OPTIONS] COMMAND [ARGS]...

apply-ukf#

Create UKF smoothed versions of cathcoords files.

cathy apply-ukf [OPTIONS] SRC DST

Options

-d, --distal <distal>#

Distal coil index.

-p, --proximal <proximal>#

Proximal coil index.

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

SRC#

Required argument

DST#

Required argument

coil-metrics#

Coil Metrics subcommands

cathy coil-metrics [OPTIONS] COMMAND [ARGS]...

calc#

calculate or plot the tracking error of localization algorithms based on bias and 95% ChebyShev (compare stats of groundtruth to localization results)

tracking_sequence_folder -> path to tracking sequence folder containing .projection files
localization_folder -> path to localization algorithm results folder
groundtruth_folder -> path to folder with GroundTruthCoords.csv … add “/” to end of path (PATH/GroundTruthFolder/)
algorithms -> localization algorithms EX: peak,centroid_around_peak,png .Note: Do not use any spaces between commas
cathy coil-metrics calc [OPTIONS] TRACKING_SEQUENCE_FOLDER LOCALIZATION_FOLDER
                        GROUNDTRUTH_FOLDER ALGORITHMS

Options

--dest <dest>#

output directory path for trackingerr.csv file. If not specified default is localization algorithm results folder

-d, --distal_index <distal_index>#

Distal coil index.

-p, --proximal_index <proximal_index>#

Proximal coil index.

-z, --dither <dither_index>#

Select dither index.

-en, --expname <expname>#

experiment name in GroundTruthCoords.csv

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

TRACKING_SEQUENCE_FOLDER#

Required argument

LOCALIZATION_FOLDER#

Required argument

GROUNDTRUTH_FOLDER#

Required argument

ALGORITHMS#

Required argument

plotter#

Barplot of tracking errors

trackerr_folder -> path to folder containing *trackingerr.csv file

cathy coil-metrics plotter [OPTIONS] TRACKERR_FOLDER

Options

-en, --expname <expname>#

experiment name in GroundTruthCoords.csv

-x, --xaxis <xaxis>#

choose x-axis column for plotting. Options: algorithm, FOV, dither, or trackseq

Options:

algorithm | FOV | dither | trackseq

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

TRACKERR_FOLDER#

Required argument

fft-projections#

Get absolute fft signal data from projection files for specified dither and distal & proximal coils and export as text file into fft subfolder

Textfile name template is “fft_signals_coilX_recX_fovXXX_readoutsXXX.txt” (coil index, recording index, field of view (mm), # of readouts)

Example of text file format PRJTXT (file format name) 1 (version) SRI_April-2020-07-09T12_20_56.765 (tracking sequence folder name) x y z x_timestamp average_timestamp readout_size (column headings: axes… length of each readout)

cathy fft-projections [OPTIONS] TRACKING_SEQUENCE_FOLDER_PATH DEST
                      RECORDING_INDEXES

Options

-d, --distal <distal_index>#

Select distal coil index.

-p, --proximal <proximal_index>#

Select proximal coil index.

-z, --dither <dither_index>#

Select dither index.

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

TRACKING_SEQUENCE_FOLDER_PATH#

Required argument

DEST#

Required argument

RECORDING_INDEXES#

Required argument

gt-tool#

cathy gt-tool [OPTIONS] [ARGS]...

Options

-d, --dest <dest>#
-en, --expname <expname>#
-m, --meta <meta>#
-c, --coil <coil>#
-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

ARGS#

Optional argument(s)

info#

Summarize the contents of a projection file.

cathy info [OPTIONS] PATH

Options

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

PATH#

Required argument

localize#

Run localization algorithms on raw projections

This convenience functions runs all the localization algorithms on projections stored under the source path. Assumes distal and proximal coils exist: provide the coil indices & catheter geometry index.

This will output catheter coordinate text files for each recording using each localization algorithm.

Optionally, the number of iterations used to converge for each catheter coordinate pair is output in text files. For non-iterative algorithms, this consists of zeroes.

cathy localize [OPTIONS] SRC_PATH DST_PATH

Options

-d, --distal <distal_index>#

Select distal coil index.

-p, --proximal <proximal_index>#

Select proximal coil index.

-g, --geometry <geometry_index>#

Select geometry index.

-z, --dither <dither_index>#

Select dither index.

-i, --iterations#

Output algorithm iterations.

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

SRC_PATH#

Required argument

DST_PATH#

Required argument

peek#

Visualize catheter projections.

If PATH is a directory, select relevant projections from available raw files to visualize. If PATH is a .projections file, display the contents of the file.

The raw data from the .projections file(s) is reconstructed using a fourier transform and the magnitude data is plotted to show a 1d spatial projection. For data from multiple axes, each axis is shown in a different subplot.

The projection files are typically recorded over several seconds: the plots are animated to show this. Coils, axes, recording numbers, etc, can be selected using command-line options

cathy peek [OPTIONS] PATH

Options

-s, --scheme <scheme>#

Select scheme for visualization.

Options:

sri | fh

-c, --coil <coil>#

Select coil(s) for visualization.

-a, --axis <axis>#

Select axis/axes for visualization.

-d, --dither <dither>#

Select dither(s) for visualization

-r, --recording <recording>#

Select recording(s) for visualization.

-p, --pick <pick>#

How pick a single recording from the final query.

Options:

rand | last

-x, --xyz <xyz>#
-gt, --groundtruth <groundtruth>#

Path to ground truth csv.

-en, --expname <expname>#

str representing experiment name to search ground truth file.

-f, --filepath <filepath>#

output file for projection animation. Requires ffmpeg. Supported extensions: .mov, .mp4, .avi

-y, --ymax <ymax>#

Maximum y axis value

-gr, --grid#

Show a grid on the plot

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

PATH#

Required argument

scatter#

cathy scatter [OPTIONS] SRC_PATH DICOM_FILE

Options

-d, --distal <distal_index>#

Select distal coil index.

-p, --proximal <proximal_index>#

Select proximal coil index.

-r, --recording <recording_index>#

Select recording index.

-g, --geometry <geometry_index>#

Select geometry index.

-gt, --groundtruth <groundtruth>#
-en, --expname <expname>#
-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

SRC_PATH#

Required argument

DICOM_FILE#

Required argument

view-dicom#

cathy view-dicom [OPTIONS] PATH

Options

-v, --verbosity <LVL>#

Either CRITICAL, ERROR, WARNING, INFO or DEBUG

Arguments

PATH#

Required argument