Skip to main content

No project description provided

Project description

.fcsv Parser

Code quality Static typing CI tests python pre-commit Code style: black

Overview

This package provides a simple way to read a markups fiducial point list file (.fcsv) for use in annotations/bounding box creation in medical images. These can be created in an application like 3D Slicer. The format of these fiducial lists is outlined here.

Requirements

This package has been tested with Python 3.8, and currently version 4.10 of the .fcsv format is supported. If running the example notebook, a virtual environment should be created and then the requirements in Linux installed using:

user@account:~/fcsv-parser$ python3 -m fcsv
user@account:~/fcsv-parser$ source fcsv/bin/activate
(fcsv) user@account:~/fcsv-parser$ pip install -r requirements.txt

If Windows is used, conda is recommended:

(base) C:\User\fcsv-parser> conda create -n fcsv python=3.8
(base) C:\User\fcsv-parser> conda activate fcsv
(fcsv) C:\User\fcsv-parser> pip install -r requirements.txt

Otherwise all that is needed is to install directly from PyPI into your environment:

(your-env) user@account:~/fcsv-parser$ pip install fcsv-parser

Usage

Once installed, a fiducial file can be loaded, returning a dataclass. The individual fiducials can be accessed with their IDs as you would a dict:

(fcsv) C:\User\fcsv-parser>python
Python 3.8.16 (default, Mar  2 2023, 03:18:16) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from fcsv_parser import read_fcsv
>>> fiducials = read_fcsv("C:\path\to\data")
>>> fiducials["F-1"]:
(170.167, 432.176, -0.0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fscv_parser-0.1.0.tar.gz (80.2 MB view hashes)

Uploaded Source

Built Distribution

fscv_parser-0.1.0-py3-none-any.whl (16.9 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page