Module: DCMTK::Configuration
- Included in:
- DCMTK
- Defined in:
- lib/dcmtk/configuration.rb
Instance Attribute Summary collapse
-
#cli ⇒ String?
Force a specific CLI command for conversion.
-
#logger ⇒ Logger
Logger for debug output, default is ‘Logger.new(STDOUT)`, but you can override it, for example if you want the logs to be written to a file.
-
#shell_api ⇒ String
Instructs DCMTK how to execute the shell commands.
-
#timeout ⇒ Integer
If you don’t want commands to take too long, you can set a timeout (in seconds).
-
#whiny ⇒ Boolean
If set to
true, it will raise errors on non-zero exit codes.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#cli ⇒ String?
Force a specific CLI command for conversion. When nil (default), auto-detects: dcm2img if available, otherwise dcmj2pnm.
45 46 47 |
# File 'lib/dcmtk/configuration.rb', line 45 def cli @cli end |
#logger ⇒ Logger
Logger for debug output, default is ‘Logger.new(STDOUT)`, but you can override it, for example if you want the logs to be written to a file.
20 21 22 |
# File 'lib/dcmtk/configuration.rb', line 20 def logger @logger end |
#shell_api ⇒ String
Instructs DCMTK how to execute the shell commands. Available APIs are “open3” (default) and “posix-spawn” (requires the “posix-spawn” gem).
37 38 39 |
# File 'lib/dcmtk/configuration.rb', line 37 def shell_api @shell_api end |
#timeout ⇒ Integer
If you don’t want commands to take too long, you can set a timeout (in seconds).
12 13 14 |
# File 'lib/dcmtk/configuration.rb', line 12 def timeout @timeout end |
#whiny ⇒ Boolean
If set to true, it will raise errors on non-zero exit codes. Defaults to true.
28 29 30 |
# File 'lib/dcmtk/configuration.rb', line 28 def whiny @whiny end |
Class Method Details
.extended(base) ⇒ Object
47 48 49 50 51 |
# File 'lib/dcmtk/configuration.rb', line 47 def self.extended(base) base.whiny = true base.shell_api = "open3" base.logger = Logger.new($stdout).tap { |l| l.level = Logger::INFO } end |
Instance Method Details
#configure {|self| ... } ⇒ Object
60 61 62 |
# File 'lib/dcmtk/configuration.rb', line 60 def configure yield self end |