Coder Social home page Coder Social logo

Comments (12)

andrewjanke avatar andrewjanke commented on August 12, 2024

This is already possible in dcm2mnc, have a look at the -fname and -dname options. Here's python snippet showing what is possible.

cmd = ['dcm2mnc', '-usecoordinates', '-anon',
'-dname', '',
'-fname', '%N_%D-%T_' + str(SeriesNumber).zfill(2) + '' + StudyDescription + '' + SeriesDescription + '%s%e%t%p%c']
cmd.extend(flist)
cmd.append(outdir)
do_cmd(cmd, False)

(From here: https://github.com/NIF-au/imagetrove-python-uploader/blob/master/dicom/imgtr-uploader-dicom.py#L421)

a

from minc-tools.

gdevenyi avatar gdevenyi commented on August 12, 2024

Thanks @andrewjanke I was aware of -fname and -dname, but it didn't appear to me that any of the "%" formatting options actually contain the info I want inserted? It looks like you're getting that elsewhere in that snippet?

from minc-tools.

andrewjanke avatar andrewjanke commented on August 12, 2024

from minc-tools.

rdvincent avatar rdvincent commented on August 12, 2024

@gdevenyi There is a poorly-documented option, %P, that is available to insert the protocol name, as well as %A to insert the acquisition or series ID. Would either of these help?

from minc-tools.

gdevenyi avatar gdevenyi commented on August 12, 2024

%P is exactly what I'm looking for

Recasting request as a "update manpage"

from minc-tools.

rdvincent avatar rdvincent commented on August 12, 2024

@gdevenyi It is already in the man page, at least on the develop branch. Not sure the man page is getting installed however.

from minc-tools.

gdevenyi avatar gdevenyi commented on August 12, 2024

Ah, on develop I'm seeing a manpage without this option listed.

from minc-tools.

rdvincent avatar rdvincent commented on August 12, 2024

It should be listed as shown here:

https://github.com/BIC-MNI/minc-tools/blob/develop/conversion/dcm2mnc/dcm2mnc.man1#L214

from minc-tools.

gdevenyi avatar gdevenyi commented on August 12, 2024

Yup, my sources have that, but the installed version seem to be coming from somewhere else.

from minc-tools.

vfonov avatar vfonov commented on August 12, 2024

from minc-tools.

gdevenyi avatar gdevenyi commented on August 12, 2024

Thanks @vfonov but that man page also is missing "%P"

from minc-tools.

vfonov avatar vfonov commented on August 12, 2024

I guess this commit came after I split up man pages: 157d053

from minc-tools.

Related Issues (20)

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.