Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMove from ARIA to Self - CT Images (EvilDICOM v2.0.6.5) #88

Closed
isachpaz opened this issue Apr 22, 2021 · 2 comments
Closed

CMove from ARIA to Self - CT Images (EvilDICOM v2.0.6.5) #88

isachpaz opened this issue Apr 22, 2021 · 2 comments

Comments

@isachpaz
Copy link
Contributor

Hi Rex,

I use your code snippet (as it can be found in VarianApiBook), - C-Move to Self (pages 44, 45).

The code works fine for plans, BUT when I do the same for Doses or CT images, I get an error:
"CMoveResponse - FAILURE_UNABLE-TO_FIND 0/0".

Any suggestion?

Looking forward to hearing from you.

All the best,

Ilias

Code 4.5
// Store the details of the daemon (Ae Title , IP , port )
var daemon = new Entity (" PHYSX_DICOM ", " 10.22.86.64 ", 51402) ;
// Store the details of the client (Ae Title , port ) -> IP address is
determined by CreateLocal () method
var local = Entity . CreateLocal (" DICOMEC1 ", 9999) ;
// Set up a client ( DICOM SCU = Service Class User )
var client = new DICOMSCU ( local );
// Set up a receiver to catch the files as they come in
var receiver = new DICOMSCP ( local );
// Let the daemon know we can take anything it sends
receiver . SupportedAbstractSyntaxes = AbstractSyntax .
ALL_RADIOTHERAPY_STORAGE ;
// Set up storage location
var desktopPath = Environment . GetFolderPath ( Environment . SpecialFolder .
Desktop );
var storagePath = Path . Combine ( desktopPath , " DICOM Storage ");
Directory . CreateDirectory ( storagePath );
// Set the action when a DICOM files comes in
receiver . DIMSEService . CStoreService . CStorePayloadAction = (dcm , asc ) =>
{
var path = Path . Combine ( storagePath , dcm. GetSelector ().
SOPInstanceUID . Data + ".dcm");
Console . WriteLine ($" Writing file { path }... ");
dcm . Write ( path );
return true ; // Lets daemom know if you successfully wrote to drive
};
receiver . ListenForIncomingAssociations ( true );
4.3 DICOM Language Basics 55
// Build a finder class to help with C- FIND operations
var finder = client . GetCFinder ( daemon );
var studies = finder . FindStudies (" DA00001 ");
var series = finder . FindSeries ( studies );
// Filter series by modality , then create list of
var plans = series . Where (s => s. Modality == " RTPLAN ")
. SelectMany (ser => finder . FindImages (ser));
var doses = series . Where (s => s. Modality == " RTDOSE ")
. SelectMany ( ser => finder . FindImages (ser));
var cts = series . Where (s => s. Modality == "CT")
. SelectMany ( ser => finder . FindImages (ser));
var mover = client . GetCMover ( daemon );
ushort msgId = 1;
foreach (var plan in plans )
{
Console . WriteLine ($" Sending plan { plan . SOPInstanceUID }... ");
// Make sure Mobius is on the whitelist of the daemon
var response = mover . SendCMove (plan , local . AeTitle , ref msgId );
Console . WriteLine ($" DICOM C- Move Results : ");
Console . WriteLine ($" Number of Completed Operations : { response .
NumberOfCompletedOps }");
Console . WriteLine ($" Number of Failed Operations : { response .
NumberOfFailedOps }");
Console . WriteLine ($" Number of Remaining Operations : { response .
NumberOfRemainingOps }");
Console . WriteLine ($" Number of Warning Operations : { response .
NumberOfWarningOps }");
}
Console . Read (); // Stop here

@isachpaz isachpaz changed the title CMove from ARIA to Self - CT Images (EvilDCIOM v2.0.6.5) CMove from ARIA to Self - CT Images (EvilDICOM v2.0.6.5) Apr 22, 2021
@isachpaz
Copy link
Contributor Author

isachpaz commented Apr 23, 2021

An update:
I checked the same code on TBOX, and it works fine!

The code does not work on Eclipse Research installation. I'm able to retrieve plans BUT no Images or Dose.
I've contacted Varian.

@isachpaz
Copy link
Contributor Author

Hi,

after a couple of days VARIAN solved the problem. The problem was on their side.
The above presented code works fine for all modalities (RT-Images, RT-Plans, RT-Doses)!

All the best,

Ilias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant