GithubHelp home page GithubHelp logo

csa_header's People

Contributors

matthew-brett avatar pre-commit-ci[bot] avatar zvibaratz avatar

Watchers

 avatar  avatar

csa_header's Issues

Pooch data repository or similar?

Worth implementing a data store with Pooch or similar? For example, on lines of : https://github.com/nipraxis/nipraxis/blob/main/nipraxis/_fetcher.py

Then you could do something like this in the README:

import csa_header
# Fetch example DICOM file from data repository.
eg_fname = csa_header.data.fetch_file('an_example.dcm')
dcm = pydicom.dcmread(eg_fname)

or the tests:

def test_something():
    eg_fname = csa_header.data.fetch_file('an_example.dcm')
    eg_dcm = pydicom.dcmread(eg_fname)
    raw_csa = eg_dcm.get((0x29, 0x1020)).value
    parsed_csa = CsaHeader(raw_csa).read()
    assert (parsed_csa['NumberOfPrescans' == 
        {'index': 1, 'VR': 'IS', 'VM': 1, 'value': 0})

Add Zenodo DOI

Issue a Zenodo DOI after a first release and add to the README.

Remove `index` entry from parsed CSA header elements

Am I right in thinking that the index elements in a CSA header are always sequential?

For example, from the README:

{
    'NumberOfPrescans': {'index': 1, 'VR': 'IS', 'VM': 1, 'value': 0},
    'TransmitterCalibration': {'index': 2, 'VR': 'DS', 'VM': 1, 'value': 247.102},
    'PhaseGradientAmplitude': {'index': 3, 'VR': 'DS', 'VM': 1, 'value': 0.0},
    'ReadoutGradientAmplitude': {'index': 4, 'VR': 'DS', 'VM': 1, 'value': 0.0},
    'SelectionGradientAmplitude': {'index': 5, 'VR': 'DS', 'VM': 1, 'value': 0.0},
...
}

Are these index entries necessary? I realize they are in the CSA header structure, but, given Python dictionary insertion order, does:

indices = [v['index'] for k, v in parsed_csa.items()]

ever differ from np.arange(len(parsed_csa))?

No releases / `pip install csa_header` not possible

I'd like to include csa_header in my package (to parse CSA headers, obviously) but cannot do so because there is no pypi release. The alternative is to install (it's parent?) dicom_parser, but that has more dependencies and seems to be behind in terms of commits to the csa lib. What's the status of this project, is it a fork of dicom_parser? Is it still actively developed, i.e. is there a pypi release planned?

Utility to fetch CSA headers from DICOM?

Nibabel has a get_csa_header function : https://github.com/nipy/nibabel/blob/master/nibabel/nicom/csareader.py#L31

It implements the logic of finding the image or series CSA header from the DICOM file. I see from that file that there is logic for finding where the relevant private elements start: https://github.com/nipy/nibabel/blob/master/nibabel/nicom/utils.py#L7. . So, for example, instead of doing this:

raw_csa = dcm.get((0x29, 0x1020)).value
CsaHeader(raw_csa).read()

you can do this:

get_csa_header(dcm, 'image')

Relationship to Nibabel, pydicom?

Where should this repo sit in relationship to Nibabel or pydicom? Should it be an optional dependency? Won't that mean that lots of DICOM libraries could have this as an optional dependency?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.