Skip to content

SendCStore - problem with RTDose import #2

@mfizyczka

Description

@mfizyczka

I'm trying to import CT, RT structures, RT plans and finally dose distribution. I do this in exactly this order.

                        DICOMObject dcm = DICOMObject.Read(dcmPath);
                        var response = storer.SendCStore(dcm, ref msgId);
                        //Write results to console
                        try
                        {
                            Console.WriteLine($"{patientId}\t{accession}\trCtResampled\t{i}\t{dcmPath.Split('\\').Last().Substring(0, 2)}\t DICOM C-Store from {local.AeTitle} => " +
                                                                $"{daemon.AeTitle} @{daemon.IpAddress}:{daemon.Port}:" +
                                                                $"{(Status)response.Status}");
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine($"{patientId}\t{accession}\trCtResampled\t{i}\t{dcmPath.Split('\\').Last().Substring(0, 2)}\tSomething went WRONG {ex}");
                        }

While trying to import RTDose I'm getting an exception:
System.NullReferenceException: Object reference not set to an instance of an object.

As the Exception was not meaningful for me I tried to import the same files using DICOM Import/Export GUI (step by step to reproduce API approach). Then, I've got warning that plan normalization has to be changed to "No normalization".

If I catch this exception with try/catch the RTDose is still imported and I can see it in Eclipse. The plan normalization is changed to "No normalization".

I've observed very similar behavior for RT Structures. If there is a structure type "MARKER" with no location, or structure with "None" type an exception is thrown. But RTStructure is still imported (as I would click OK to the warning in GUI).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions