Coder Social home page Coder Social logo

Comments (19)

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024 1

Yes, that was it. Thanks. I can start fixing the files and consolidate them in one folder to proceed with imports.

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

Any hints in the log (~/Apps/dvh_analytics/logs)?

I've found that the files on there are not always DICOM compliant. But, if you let me know which patients specifically, I'll see if I can track it down and make a patch to accommodate.

If there isn't showing up in the log, it often does in the command line window.

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

Running on a VM or Citrix?

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

I am running the downloaded .exe or .dmg files. I run the codes locally.

I had no issues importing other DICOM files so far, only the ones from the TCIA are giving the issues.

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

Can you let me know which TCIA patients/files you’re importing, and I can try to reproduce the error?

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

Archive 2.zip
Neither of the two patient directories was importing for me in the zip file. The same is true for the rest of 95 patients I downloaded

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

HNSCC-01-0006

WARNING: ERROR: Failed Import for HNSCC-01-0006 1.3.6.1.4.1.14519.5.2.1.1706.8040.337695080224235024220045057410
'Dataset' object has no attribute 'ContourGeometricType'

I think the solution is to add a try/except clause into DVHA somewhere, but I need to keep investigating. I suspect the structure file had contours that were deleted but not from a TPS and maybe isn't DICOM compliant? But opening HNSCC-01-0006 crashes the dicompyler GUI app as well.

Platform information:
System: Darwin
Version: ('10.14.6', ('', '', ''), 'x86_64')
Python Version: 2.6.6
dicompyler Version: 0.4.2

dicompyler.dicomparser: DEBUG: Found ROI #23: Avoid
dicompyler.dicomparser: DEBUG: Found ROI #24: Avoid2
dicompyler.dicomparser: DEBUG: Found ROI #25: Hot
dicompyler.dicomparser: DEBUG: Found ROI #26: low54
dicompyler: ERROR: Unhandled exception: Traceback (most recent call last):
  File "dicompyler/main.pyo", line 727, in Run
  File "threading.pyo", line 484, in run
  File "dicompyler/main.pyo", line 433, in LoadPatientDataThread
  File "dicompyler/dicomparser.pyo", line 359, in GetStructures
  File "dicom/dataset.pyo", line 256, in __getattr__
AttributeError: Dataset does not have attribute 'ContourGeometricType'.

@bastula Any thoughts?

HNSCC-01-0007

WARNING: /Users/ninja/Downloads/Archive-2/HNSCC-01-0007/04-29-1997-RT SIMULATION-32176/1.000000-09274/1-1.dcm:  
StudyInstanceUID from DICOM-RT Dose file could not be matched to any DICOM-RT Plan

Although theReferencedSOPInstanceUID in the ReferencedRTPlanSequence of the dose DICOM matches the SOPInstanceUID of the plan DICOM, they are not matched in DVHA because the StudyInstanceUIDs do not match which indicates the plan and the dose are based on different imaging sets. I can only speculate why they don't match, but I see this type of thing frequently with DICOM files from research coders rather than commercial vendors.

The other issue is that DVHA is designed to use StudyInstanceUID as a unique identifier in the SQL database for a set of DICOM files. This is also done to flag potential reimports.

Still dusting off the cobwebs, but pretty sure this issue has been posted before and is the reason I created the "Pre-Process DICOM" button within the Import DICOM window. From the DVHA manual:

If you are working with non-clinical DICOM files (e.g., phantom or research plans) a method to assign a new StudyInstanceUID to all DICOM files in each directory is available from the Import DICOM window. Simply click the ”Pre-Process DICOM” button and then select the top-level directory. This will edit your DICOM files, proceed with caution.

It's been a while since I've used this feature, but for sure you'll need to collect each DICOM file set into one directory each. At least you're using TCIA files, so harm to just try it since you can redownload the files if they break. But you'll need to script something to get them into one directory if you have a bunch of these.

I'll also point out that, if the Referenced UIDs don't match, DVHA will default to unmatched files within the same directory as long as the StudyInstanceUID matches.

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

Hi,
I tried to put all DICOM files in one directory of HNSCC-01-0006. I pre-processed the DICOM files but they did not import. It stopped without any message. Checking the logfile, i have the following entry:

2021-04-22 10:29:19,254 - dvha - WARNING - ERROR: Failed Import for HNSCC-01-0006 1.2.826.0.1.3680043.8.498.16532277323186723652925490403957954418
'Dataset' object has no attribute 'ContourGeometricType'

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

The pre-processing would only fix the StudyInstanceUID issue. HNSCC-01-0006 will require a work-around since it appears to have some non DICOM-compliant structures.

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

I see. It worked for the windows version when I put all files in the same directory and used the pre-processing. It did not work for the Mac. It is looking for a C: drive directory structure for some reason
this is the error from the Mac logfile:
2021-04-22 13:24:37,340 - dvha - WARNING - ERROR: Failed Import for HNSCC-01-0007 1.2.826.0.1.3680043.8.498.20071232411634210809715512880812328716
[Errno 2] No such file or directory: 'C:\Users\Physics\Apps\dvh_analytics\data\imported/HNSCC-01-0007'

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

DVHA lets the OS environment determine where your user folder is, there's nothing OS specific coded. It looks like your environment thinks your user folder is C:\Users\Physics. I'm a little suspicious as to why the file path has both forward and backward slashes. You're definitely not running on a Virtual Machine or Citrix? (Shouldn't matter?)

APPS_DIR = join(expanduser("~"), "Apps")

Where expanduser is a native python function os.path.expanduser

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

I think I understand now. There is a file that stores your imported directory: ~/Apps/dvha_analytics/preferences/.options. My guess is you copied the dvh_analytics directory from a Windows computer to your Mac?

Go into DVHA options and change the imported directory. Hopefully that fixes your issue?

image

I suppose I should reset the directory to the default value if the stored directory path can't be created.

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

The commit referenced above resolves the issue of crashing when the stored directory in options does not exist. The default directory will be used instead. Currently in v0.9.7 branch. Hope to push to master soon.

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

from dvh-analytics.

SotiriStathakis avatar SotiriStathakis commented on June 15, 2024

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

from dvh-analytics.

cutright avatar cutright commented on June 15, 2024

Posted some new code, information here: #168

from dvh-analytics.

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.