Sign in
RadiAnt DICOM Viewer - Discussion Forum
send DICOM to PACS from RadiAnt Viewer

Oct 23, 2014 08:19 PM
by Tommy
Hi, the new beta can correctly query and retrieve cases from a PACS and load the DICOM images inside the RadiAnt Viewer application.

I'm wondering if you guys are planning to add a feature to do the opposite which is to send the DICOM images loaded inside RadiAnt to the PACS.

It happens often to me to read CDs from outside clinics with RadiAnt and it would be very nice to be able with 1 click to send all the DICOMs into my PACS.

actually I have to manually download the DICOMs from the CD, save it in my hard disk and then manually import them into the PACS.

I think that when RadiAnt reads a CD it already temporarily saves those images in the hard disk, why not also sending them to a correctly configured DICOM node?
Oct 25, 2014 10:58 AM
by RadiAnt
Sure, the DICOM send feature is planned. However it's a bit more complicated - the images read from CDs often need to be converted to match the server's transfer syntax. There are also some other issues. Anyway, there are a few things that we need to deal with first. Like oblique MPR/MIP/VR, for example.
Apr 23, 2016 04:37 AM
by Tommy
actually I create a Visual Basic script that copies the DICOM folder from the CD into my PACS system (I use a ClearCanvas PACS that has a special folder called "primary incoming" where you can just copy DICOM files that will then be automatically processed and archived into the PACS) and then load the same images in RadiAnt

here's the code, feel free to use it and adapt it to your PACS scenario.
save it as a text file and then change the extension from .txt to .vbs

you need to know Visual Basic in order to tweak it.
code comments are in Italian but you may use any online translation tool to convert them.



'--------------------------------------------------------------------------------------
' CopiaCD.vbs - VBScript per copiare cartelle da CD-ROM ad HD - last update 17-11-2015
'--------------------------------------------------------------------------------------

' 1- copia immagini DICOM da CD ad HD
' 2- carica immagini salvate su HD in RadiAnt Viewer
' 3- copia immagini salvate su HD nello STORAGE
' 4- espulsione CD

'--------------------------------------------------------------------------------------
' 1- copia immagini DICOM da CD ad HD
'--------------------------------------------------------------------------------------
' definisce il nome della cartella di salvataggio dei files su HD mediante InputBox
NomeCD = InputBox("inserire NOME del CD da copiare. es. ROSSI MARIO RM 2010","INSERIMENTO DATI COPIA CD","")

CopiaCDsuHD = "C:\DICOM\Import" & "\" & NomeCD 'cartella dove verranno copiate le immagini da CD ad HD

Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
RadiAntLoad = "cmd.exe /C ""C:\Program Files\RadiAntViewer64bit\RadiAntViewer.exe"" -d " & CopiaCDsuHD
'oShell.run RadiAntLoad

' verifica che il CD-ROM contenga un disco
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = objFSO.Drives
For Each objDrive in colDrives


If objDrive.DriveType = 4 Then
If objDrive.IsReady Then
' cerca le cartelle con immagini DICOM nel CD e le copia su HD nella cartella specificata
Set FSO = CreateObject("Scripting.FileSystemObject")

if Fso.FolderExists ("D:\DATA") then
FSO.CopyFolder "D:\DATA", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\DICOM") then
FSO.CopyFolder "D:\DICOM", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\IMAGES") then
FSO.CopyFolder "D:\IMAGES", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\000") then
FSO.CopyFolder "D:\000", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\studies") then
FSO.CopyFolder "D:\studies", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\_STUDIES") then
FSO.CopyFolder "D:\_STUDIES", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\CDSURF") then
FSO.CopyFolder "D:\CDSURF", CopiaCDsuHD
end if

if Fso.FolderExists ("D:\study000") then
FSO.CopyFolder "D:\study000", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\DATA") then
FSO.CopyFolder "E:\DATA", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\DICOM") then
FSO.CopyFolder "E:\DICOM", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\IMAGES") then
FSO.CopyFolder "E:\IMAGES", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\000") then
FSO.CopyFolder "E:\000", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\studies") then
FSO.CopyFolder "E:\studies", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\_STUDIES") then
FSO.CopyFolder "E:\_STUDIES", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\CDSURF") then
FSO.CopyFolder "E:\CDSURF", CopiaCDsuHD
end if

if Fso.FolderExists ("E:\study000") then
FSO.CopyFolder "E:\study000", CopiaCDsuHD
end if


'if Fso.FolderExists ("C:\Test\DICOM") then
'FSO.CopyFolder "C:\Test\DICOM", CopiaCDsuHD
'end if

'attiva l'espulsione del CD
Call EjectCD


'--------------------------------------------------------------------------------------
' 2- carica immagini salvate su HD in RadiAnt Viewer
'--------------------------------------------------------------------------------------
' carica le immagini copiate sull'HD e le lancia su RadiAnt via linea di comando
RadiAntLoad = "cmd.exe /C ""C:\Program Files\RadiAntViewer64bit\RadiAntViewer.exe"" -d " & CopiaCDsuHD
oShell.run Ra
Jun 15, 2018 10:06 AM
by asa
Hi, can you please update your script and put point 3 and 4 ??
Apr 13, 2020 01:51 PM
by Tommy
sorry for the delay...
it seems the copy & paste was incomplete in my previous post...
here's the missing part (part 2 was incomplete as well)


'--------------------------------------------------------------------------------------
' 2- carica immagini salvate su HD in RadiAnt Viewer
'--------------------------------------------------------------------------------------
' carica le immagini copiate sull'HD e le lancia su RadiAnt via linea di comando
RadiAntLoad = "cmd.exe /C ""C:\ZB\RadiAntViewer\RadiAntViewer.exe"" -d " & CopiaCDsuHD
oShell.run RadiAntLoad

'--------------------------------------------------------------------------------------
' 3- copia immagini salvate su HD nello STORAGE - disabilitato per legge privacy
'--------------------------------------------------------------------------------------
'copia i files dal disco fisso allo storage
'FSO.CopyFolder CopiaCDsuHD, "\\Storage\fs\Primary_Incoming" & "\" & NomeCD
' MsgBox "copia CD completata"

'--------------------------------------------------------------------------------------
'4- espulsione CD
'--------------------------------------------------------------------------------------

Else ' se il CD è vuoto viene espulso il cassettino
'MsgBox "nessun disco nel lettore CD-ROM"
'Call EjectCD
End if

End If
Next


Sub EjectCD

Dim ts
Dim strDriveLetter
Dim intDriveLetter
Dim fs 'as Scripting.FileSystemObject
Const CDROM = 4
On Error Resume Next
Set fs = CreateObject("Scripting.FileSystemObject")
strDriveLetter = ""
For intDriveLetter = Asc("A") To Asc("Z")
Err.Clear
If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
If Err.Number = 0 Then
strDriveLetter = Chr(intDriveLetter)
Exit For
End If
End If
Next
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection
For d = 0 to colCDROMs.Count - 1
colCDROMs.Item(d).Eject
Next

set owmp = nothing
set colCDROMs = nothing
end sub

Post reply
Author (first name or pseudonym):

Message:

Captcha image


Visitors can post messages on the forum without having to register. Please input your first name or pseudonym in the "Author" field. Do not publish any personally identifiable information (PII).

Please ensure you write your posts in English so that our international audience can understand and reply to your message.

The Administrator reserves the right to remove any messages that violate our forum rules; for example, those that are not related to the RadiAnt DICOM Viewer software, published in a language other than English, contravene regulations, etc.