Coder Social home page Coder Social logo

spark-dicom's People

Contributors

guillaumedesforges avatar marijncv avatar robopoc avatar smelc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

plpxsk

spark-dicom's Issues

Dependency mismatch?

Running

display(spark.read.format("dicomFile")
  .option("recursiveFileLookup", true)
  .option("includeContent", true)
  .load("/mnt/tcia/gcs-public-data--healthcare-tcia-apollo/"))

results in NoSuchMethodError: org.apache.hadoop.fs.FSDataInputStream.readAllBytes()[B

likely due to dependency mismatch.

Add a "parsing errors" columns

Following comment from @robopoc

Currently, a parsing error stops the whole DataSource read.

Because of the nature of DICOM files, failure is bound to happen.

The goal would be to allow read failure, and report them to a column.

Example:

  • An element of Keyword "A" of VR TM has an invalid time written 12:10:55.0 (with : which does not comply to standard)
  • In a column "errors", we get [{ column: "A", message: "DateTimeParseException: ..." }]

Read whole bytes

Would load the raw binary and drop it into a column.

Need optionality just like PixelData

Recover from reading files which are not DICOM

Currently, when the data source reads a file which is not a DICOM file, the entire job fails.

The data source should just go to the next file.

An idea would be to add a boolean column isDicom. Then, parsing a non-DICOM file would still give you an entry, but without any data but isDicom = false. This would increase ease of use as it would allow to ensure file detection.

DateTimeParseException

I'm getting the below error message when trying to read DICOM files from the TCIA gs bucket.

java.time.format.DateTimeParseException: Text '122734.625000' could not be parsed, unparsed text found at index 10

Code to reproduce (pyspark):

APOLLO_FILE_PATH = "gs://gcs-public-data--healthcare-tcia-apollo/dicom/"
apollo_df = spark.read.format("dicomFile").option("recursiveFileLookup", "true").load(APOLLO_FILE_PATH)
apollo_df.collect()

Read private tags

Currently, private tags are not read at all.

We could have a column "private data" in StringType in which we dump private tags as a JSON string.

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.