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).
I'm trying to import CT, RT structures, RT plans and finally dose distribution. I do this in exactly this order.
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).