DCMTK config fle dcmqrscp.cfg "error: Invalid parameter value dcmqrscp.cfg" - dcmtk

I use DCMTK recently and I met a problem.
Purpose: use dcmtk tools to simulate the basic commands in localhost. My OS is Windows. The dcmqrscp.cfg is
NetworkTCPPort = 11112
MaxPDUSize = 16384
MaxAssociations = 16
HostTable BEGIN
acme1 = (ACME1, LAPTOP-DCM81P8J, 1234)
acme2 = (ACME_STORE, localhost, 5678)
acmeCTcompany = acme1, acme2
HostTable END
VendorTable BEGIN
"Acme CT Company" = acmeCTcompany
VendorTable END
AETable BEGIN
ACME_STORE d:\mj\scu RW (100, 1024mb) acmeCTcompany
AETable END
When I used dcmqrscp to enable the config file, the error popped up:
error
I don't find anything wrong in the config file. So what the reason is.

Related

Problems calling shell command from .net core Linux

I have some problems calling commands from a Linux .net core consol application.
Sub Main()
Dim PI As New ProcessStartInfo
Using Proc As New Process
With PI
.FileName = "cat"
.Arguments = "/etc/*-release"
.RedirectStandardOutput = True
.UseShellExecute = False
.CreateNoWindow = True
End With
Proc.StartInfo = PI
Proc.Start()
PI = Nothing
Console.Write(Proc.StandardOutput.ReadToEnd)
End Using
End Sub
I get this error:
cat: '/etc/*-release': No such file or directory
It work if I disable redirection and set UseShellExecute = True, but I would like to be able to use the output in my code.
When you run a command like
cat /etc/*-release
The linux shell (bash, probably) evaluates each argument, then calls the program with the evaluated arguments. Simple words evaluate to themselves, but variables (like $SOME_ARGUMENT) and patterns (like *) evaluate to the values and file names. So the shell really evaluates the above into (assuming there is just one file):
cat /etc/os-release
And so the cat program just gets that one argument - without any globs like *.
If you want to emulate that behaviour in your program, you need to set UseShellExecute to True.
Or, perhaps you can do the evaluation yourself. APIs like Directory.EnumerateFiles let you do that:
Dim textFiles = Directory.EnumerateFiles("/etc/", "*-release")
Then you need to walk this collection and use the exact file name as your .Arguments value.
Edit: But to go a bit further, why are you even trying to do this? If you have read the file completely, why call cat. Why not just Console.WriteLine() the file itself rather than calling cat?
Ahhh....got it!
I just have to use bash -c ""cat ""/etc/*-release""""
Sub Main()
Dim PI As New ProcessStartInfo
Using Proc As New Process
With PI
.FileName = "bash"
.Arguments = "-c ""cat ""/etc/*-release"""""
.RedirectStandardOutput = True
.UseShellExecute = False
.CreateNoWindow = True
End With
Proc.StartInfo = PI
Proc.Start()
PI = Nothing
Console.Write(Proc.StandardOutput.ReadToEnd)
End Using
End Sub

How to use dcmtk/dcmprscp in Windows

How can I use dcmprscp to receive from SCU Printer a DICOM file and save it, I'm using dcmtk 3.6 & I've some trouble to use it with the default help, this's what I'm doing in CMD:
dcmprscp.exe --config dcmpstat.cfg --printer PRINT2FILE
each time I receive this messagebut (database\index.da) don't exsist in windows
W: $dcmtk: dcmprscp v3.6.0 2011-01-06 $
W: 2016-02-21 00:08:09
W: started
E: database\index.dat: No such file or directory
F: Unable to access database 'database'
I try to follow some tip, but the same result :
http://www.programmershare.com/2468333/
http://www.programmershare.com/3020601/
and this's my printer's PRINT2FILE config :
[PRINT2FILE]
hostname = localhost
type = LOCALPRINTER
description = PRINT2FILE
port = 20006
aetitle = PRINT2FILE
DisableNewVRs = true
FilmDestination = MAGAZINE\PROCESSOR\BIN_1\BIN_2
SupportsPresentationLUT = true
PresentationLUTinFilmSession = true
PresentationLUTMatchRequired = true
PresentationLUTPreferSCPRendering = false
SupportsImageSize = true
SmoothingType = 0\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15
BorderDensity = BLACK\WHITE\150
EmptyImageDensity = BLACK\WHITE\150
MaxDensity = 320\310\300\290\280\270
MinDensity = 20\25\30\35\40\45\50
Annotation = 2\ANNOTATION
Configuration_1 = PERCEPTION_LUT=OEM001
Configuration_2 = PERCEPTION_LUT=KANAMORI
Configuration_3 = ANNOTATION1=FILE1
Configuration_4 = ANNOTATION1=PATID
Configuration_5 = WINDOW_WIDTH=256\WINDOW_CENTER=128
Supports12Bit = true
SupportsDecimateCrop = false
SupportsTrim = true
DisplayFormat=1,1\2,1\1,2\2,2\3,2\2,3\3,3\4,3\5,3\3,4\4,4\5,4\6,4\3,5\4,5\5,5\6,5\4,6\5,6
FilmSizeID = 8INX10IN\11INX14IN\14INX14IN\14INX17IN
MediumType = PAPER\CLEAR FILM\BLUE FILM
MagnificationType = REPLICATE\BILINEAR\CUBIC
The documentation of the "dcmprscp" tool says:
The dcmprscp utility implements the DICOM Basic Grayscale Print
Management Service Class as SCP. It also supports the optional
Presentation LUT SOP Class. The utility is intended for use within the
DICOMscope viewer.
That means, it is usually not run from the command line (as most of the other DCMTK tools) but started automatically in the background by DICOMscope.
Anyway, I think the error message is clear:
E: database\index.dat: No such file or directory
F: Unable to access database 'database'
Did you check whether there is a subdirectory "database" and whether the "index.dat" file exists in this directory? If you should ask why there is a need for a "database" then please read the next paragraph of the documentation:
The dcmprscp utility accepts print jobs from a remote Print SCU.
It does not create real hardcopies but stores print jobs in the local
DICOMscope database as a set of Stored Print objects (one per page)
and Hardcopy Grayscale images (one per film box N-SET)

Eclipse ABAP Development: Cannot Retrieve Connection configuration

I have installed ABAP Development Tools on Eclipse 4.2 and Kubuntu 12.04 64 bit and everything went fine.
When I try to create a new ABAP Project and search for configured SAP Connections on the SAP GUI (I have SAP GUI for Java 7.30 rev 3) Eclipse shows the following error:
"Configuration not found in settings file '/home/dfabbri/.SAPGUI/settings', with include 'null', and message server 'null'"
I verified that file '/home/dfabbri/.SAPGUI/settings' is present and not empty; here is the content:
############################################################
#
# file : /home/dfabbri/.SAPGUI/settings
# created : 08.05.2012 12:42:08 CEST
# encoding: UTF-8
#
############################################################
#logonFrameY = "83"
#logonFrameX = "137"
#GLF_showDetailCol = "1"
#GLF_ColumnState = "0 / 75"
#logonFrame_2_X = "970"
#logonFrame_2_Y = "241"
#frameWidth = "778"
#frameHeight = "900"
#logonFrame_2_Width = "348"
#logonFrame_2_Height = "451"
#lookAndFeelDefault = "Tradeshow"
#propFont = "Roboto Cn"
#fixedFont = "Ubuntu Mono"
#labelFont = "Roboto"
#genFont = "Roboto Cn"
#forceLongWindowTitle = "true"
#showListboxKeyAlways = "true"
#listboxSortByKey = "true"
#overwrite = "false"
Does anyone have any suggestion about this problem?
I tried on a Windows Virtual Machine and everything went fine.
I realize this is a really old question but just in case you still have this issue (I have it on my mac all the time) add the following two entries to the bottom of that settings file:
#INCLUDE = "file:///home/dfabbri/.SAPGUI/connections"
#MESSAGESERVER = "file:///home/dfabbri/.SAPGUI/message_servers"
Then create the two files above in that path (connections should already be there), message_servers can be empty. Hope this helps.

logoff7.vbs script error in XP 2 when restart PC

i have a logoff VB script (it's from http://www.rlmueller.net/Logon7.htm). it's use for limit login user.
In Win 7 the script run just fine but i've get an error in XP SP2 when i restart the PC :
Script : logoff7.vbs
line : 63
char : 9
Error : Permission denied
code : 800A0046
Source : Microsoft VBScrpt runtime error
below is the code :
' Check if flag file exists for this user.
If (objFSO.FileExists(strFlagFile) = True) Then
' Read encoded computer name from the flag file.
Set objFile = objFSO.OpenTextFile(strFlagFile, ForReading)
strLine = objFile.ReadLine
objFile.Close
' Check encoded computer name.
If (strLine = strComputerEncoded) Then
' Delete the file.
objFSO.DeleteFile strFlagFile
End If
Wscript.Quit
End If
script for line: 63 char: 9 is
objFSO.DeleteFile strFlagFile.
please help me to resolve this problem.
thx before, i'm sorry if my english is not well enough.

Writing files gets stuck on network share

I have a program that writes files to a network share at a high rate, from a few (3) threads at once.
After running for a while (usually a short while) some of these threads get stuck. Using Process Monitor, I can see that there are calls to WriteFile and CloseFile that simply have no answer.
At this point, I can't shut down the process at all, even killing it from the task manager does nothing.
The interesting thing is that this happens when the computer hosting the shares is running Windows Server 2008 (R2). If I move the shares to a Windows 2003 computer, I don't see these problems. Also, I only see this problem if the program is run on a computer that is running Windows Server 2008 (different computer than the share host).
Here is a short program that quickly reproduces the problem. The files in the source directory range in size from 1 to 20 MB:
Imports System.IO
Imports System.Threading
Module Module1
Private m_sourceFiles As FileInfo()
Private m_targetDir As String
Sub Main(ByVal args As String())
Dim sourceDir As New DirectoryInfo(args(0))
m_sourceFiles = sourceDir.GetFiles()
m_targetDir = args(1)
For i As Integer = 0 To 2
ThreadPool.QueueUserWorkItem(AddressOf DoWork)
Next
Console.ReadLine()
End Sub
Private Const BUFFER_SIZE As Integer = (128 * 1024)
Private Sub DoWork(ByVal o As Object)
Console.WriteLine(Thread.CurrentThread.ManagedThreadId)
Dim random As New Random(Thread.CurrentThread.ManagedThreadId)
While True
Dim fileIndex As Integer = random.Next(m_sourceFiles.Count)
Dim sourceFile As FileInfo = m_sourceFiles(fileIndex)
Dim input As FileStream = sourceFile.OpenRead
Dim targetName As String = sourceFile.Name.Replace(sourceFile.Extension, random.Next(Integer.MaxValue) & sourceFile.Extension)
Dim targetPath As String = m_targetDir & "\" & targetName
Dim output As FileStream = File.Create(targetPath)
Dim bytes() As Byte = New Byte((BUFFER_SIZE) - 1) {}
Dim read As Integer = input.Read(bytes, 0, bytes.Length)
While read <> 0
output.Write(bytes, 0, read)
read = input.Read(bytes, 0, bytes.Length)
End While
output.Flush()
output.Close()
Console.WriteLine(Thread.CurrentThread.ManagedThreadId & " - " & targetName)
End While
End Sub
End Module
The problem was caused by Symantec Antivirus.
Apparently they don't support 2008 R1 yet.
I was able to workaround the issue by disabling SMB 2.0 on the client computer, as described here:
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled

Resources