Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 15 12:29

    Enet4 on master

    support RGB, YBR and YBR_FULL c… more efficient rgb handling add more clarity and 3 more (compare)

  • May 15 12:29
    Enet4 closed #127
  • May 15 12:29
    Enet4 closed #119
  • May 15 12:12
    Enet4 synchronize #127
  • May 13 17:45
    pevers synchronize #127
  • May 13 17:44
    pevers commented #127
  • May 13 17:38
    pevers synchronize #127
  • May 13 17:23
    pevers synchronize #127
  • May 13 13:39
    Enet4 commented #128
  • May 13 13:38
    Enet4 commented #128
  • May 13 12:41
    vsaase opened #128
  • May 12 19:18
    pevers opened #127
  • May 10 14:31
    Enet4 commented #63
  • May 10 14:12
    desprit commented #63
  • May 10 13:25
    Enet4 commented #63
  • May 10 13:25
    Enet4 commented #63
  • May 10 12:57
    desprit commented #63
  • May 10 12:56
    desprit commented #63
  • May 07 05:41
    desprit commented #63
  • May 06 20:44
    Enet4 commented #63
Paul Knopf
@pauldotknopf
Hey, I've already wrote the PDU reading/writing from streams. I am at the part where I need to process the DIMSE commands now, requiring actual DICOM parsing, which is right where you are with dicom-rs.
Paul Knopf
@pauldotknopf
I am going to fork dicom-rs now and add my changes into it. My plan:
  • Create a dicom-pdu crate. This will house the definition of each PDU, as well as the parsers/writers for each PDU type.
  • The dicom-pdu crate won't provide much functionality other than making PDUs type-safe.
  • Create a dicom-pdu-state crate, which will implement a state machine for ensuring PDUs are sent/received in a legal format. See here: http://dicom.nema.org/dicom/2013/output/chtml/part08/sect_9.2.html
  • Create a dicom-dimse crate that will sit on top dicom-pdu and dicom-pdu-state, implementing C-STORE/C-FIND/etc for both SCU and SCP.
  • Create a dicom-scu crate which will simplify the interaction with the SCU ops implemented in dicom-dimse. This will expose things like upload progress, auto conversion of DCM files based on negotiated transfer syntax (JPEG->RAW, etc).
  • Create a dicom-scp create which will simplify the implementation of an SCP server.
Some future plans I have, implement a C-headers on top of the dicom-scu and dicom-scp crates, which I will use to auto-gen interop code for .NET/Python/etc.
Eduardo Pinho
@Enet4
Hey @pauldotknopf , thanks for the PR! It might take me a while before I actually look into it, so feel free to iteratively polish the new crates with documentation and tests the next few days. This should also make it easier to understand the scope of the crates and how they are meant to be consumed.
Christopher Speck
@neandrake
Hello! Congrats on publishing the dicom crate!
A few years ago (~early 2016) I started work on my own dicom library in rust that I've worked on only sporadically. I've been watching this project for a while and am excited to see it progress.
Paul Knopf
@pauldotknopf
Is there a way to convert a InMemDicomObject to a byte array?
Paul Knopf
@pauldotknopf
How do we want to handle padding chars? I'm currently seeing odd string values with VR::UI have a trailing "NULL" char. I feel like this should be an implementation detail, hidden from the API surface entirely.
Christopher Speck
@neandrake

From http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html,

A character string containing a UID that is used to uniquely identify a wide variety of items. The UID is a series of numeric components separated by the period "." character. If a Value Field containing one or more UIDs is an odd number of bytes in length, the Value Field shall be padded with a single trailing NULL (00H) character to ensure that the Value Field is an even number of bytes in length.

When parsing the value of a UI as a String the null character should be removed from the end if the length is even, as the null character was added to enforce an even length
Certain character-sequence VRs can also be padded with spaces at the end of the value which the VR will indicate if it's considered significant or not.
Christopher Speck
@neandrake
Here's the current code I'm using for parsing a string value. It's incomplete and I've been working on adding tests to handle some other odd cases I've run into. https://gist.github.com/neandrake/dc402dbd2e6b4e24fa6bf2cf9f2383c0
Paul Knopf
@pauldotknopf
@neandrake, what is that code a part of? dicom-rs? Are you working on another implementation?
Christopher Speck
@neandrake
That's from my codebase. I've been working off-and-on over the past few years putting together a DICOM library in rust
Christopher Speck
@neandrake
I've watched this repo to keep tabs on how things are progressing. I've looked through the code a little but it looks to use much more idiomatic rust than I'm familiar with (I only have one generic type and just the other day added the first trait).
Ilya Baryshnikov
@ibaryshnikov
Hi all! Thanks for building such an awesome crate!
Eduardo Pinho
@Enet4
Oh, hello there! I'm sorry, I haven't been paying attention to chat. Thank you all for your participation so far! :+1:
Eduardo Pinho
@Enet4
To answer some of the concerns exposed here: writing objects into a byte array or any other target is indeed a matter for #15. It should definitely be worked on soon.
Whether the implementation should remove trailing spaces is a good concern. We might not benefit that much from this level of transparency. Regardless of how we treat these strings, working on lazy objects and string-preserving values seems like a step in the right direction so far.
Eduardo Pinho
@Enet4
This is an ambitious project, one which I have tried to push forward for quite a while. For a long time I fell into the trap of excessive refactoring, but at least this came with the benefit of ending up with a more mature code base in the end. One that will hopefully be more pleasing to work with in future years.
I also chose not to squat the crate names on crates.io until I had something substantial to show. I take a perspective of responsibility when using crate names in the registry to make something useful out of them, and not just like they're free real estate. Gladly, I was still able to take the names three years after the beginning of the project.
Ilya Baryshnikov
@ibaryshnikov
@Enet4 you have been working on this crate for three years?! That's massive! Thanks for sharing your work! As I use it for free, I still feel a need to give something back, sandly the best I can do at the moment is testing, due to lack of knowledge about DICOM standard...
Eduardo Pinho
@Enet4
Oops, I forgot this chatroom existed again. I should probably set up notifications on my phone.
@ibaryshnikov So far, I can only thank you for appreciating this work and for the contributions made so far. This has been quite a ride, and there's so much more to fulfil in this project.
Daryl.Xu
@ziqiangxu
image.png
Hello, why some dcm files have no pixel data?
Pavel Zaytsev
@iberisoft

Hello, why some dcm files have no pixel data?

It's simple: a file might be encapsulated PDF, structured report, presentation context... there are many DICOM files designed for storing something else than pixels.