rtp-connect 1.6 → 1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,136 +0,0 @@
1
- = RTPConnect
2
-
3
- The RTPConnect library allows you to read, edit and write RTPConnect files in Ruby.
4
- RTPConnect is a file format used in radiotherapy (e.g. Mosaiq) for export & import
5
- of treatment planning data. The library is written entirely in Ruby and has no
6
- external dependencies.
7
-
8
-
9
- == INSTALLATION
10
-
11
- gem install rtp-connect
12
-
13
-
14
- == REQUIREMENTS
15
-
16
- * Ruby 1.9.3 (or higher)
17
-
18
-
19
- == BASIC USAGE
20
-
21
- === Load & Include
22
-
23
- require 'rtp-connect'
24
- include RTP
25
-
26
- === Read, modify and write
27
-
28
- # Read file:
29
- rtp = Plan.read('some_file.rtp')
30
- # Extract the Patient's Name:
31
- name = rtp.patient_last_name
32
- # Modify the Patient's Name:
33
- rtp.patient_last_name = 'Anonymous'
34
- # Write to file:
35
- rtp.write('new_file.rtp')
36
-
37
- === Create a new Plan Definition Record from scratch
38
-
39
- # Create the instance:
40
- rtp = Plan.new
41
- # Set the Patient's ID attribute:
42
- rtp.patient_id = '12345'
43
- # Export the instance to an RTP string (with CRC):
44
- output = rtp.to_s
45
-
46
- === Convert an RTP file to DICOM:
47
-
48
- p = Plan.read('some_file.rtp')
49
- dcm = p.to_dcm
50
- dcm.write('rtplan.dcm')
51
-
52
- === Log settings
53
-
54
- # Change the log level so that only error messages are displayed:
55
- RTP.logger.level = Logger::ERROR
56
- # Setting up a simple file log:
57
- l = Logger.new('my_logfile.log')
58
- RTP.logger = l
59
- # Create a logger which ages logfile daily/monthly:
60
- RTP.logger = Logger.new('foo.log', 'daily')
61
- RTP.logger = Logger.new('foo.log', 'monthly')
62
-
63
- === Scripts
64
-
65
- For more comprehensive and useful examples, check out the scripts folder
66
- which contains various Ruby scripts that intends to show off real world
67
- usage scenarios of the RTPConnect library.
68
-
69
- === IRB Tip
70
-
71
- When working with the RTPConnect library in irb, you may be annoyed with all
72
- the information that is printed to screen, regardless of your log level.
73
- This is because in irb every variable loaded in the program is
74
- automatically printed to the screen. A useful hack to avoid this effect is
75
- to append ";0" after a command.
76
-
77
- Example:
78
- rtp = Plan.read('some_file.rtp') ;0
79
-
80
-
81
- == RESOURCES
82
-
83
- * {Rubygems download}[https://rubygems.org/gems/rtp-connect]
84
- * {Documentation}[http://rubydoc.info/gems/rtp-connect/frames]
85
- * {Source code repository}[https://github.com/dicom/rtp-connect]
86
-
87
-
88
- == RESTRICTIONS
89
-
90
- === Supported records
91
-
92
- * Plan definition [PLAN_DEF]
93
- * Prescription site [RX_DEF]
94
- * Site setup [SITE_SETUP_DEF]
95
- * Simulation field [SIM_DEF]
96
- * Treatment field [FIELD_DEF]
97
- * Extended treatment field [EXTENDED_FIELD_DEF]
98
- * Control point record [CONTROL_PT_DEF]
99
- * Dose tracking record [DOSE_DEF]
100
-
101
- === Unsupported records
102
-
103
- * Extended plan definition [EXTENDED_PLAN_DEF]
104
- * Document based treatment field [PDF_FIELD_DEF]
105
- * Multileaf collimator [MLC_DEF]
106
- * MLC shape [MLC_SHAPE_DEF]
107
- * Dose action points [DOSE_ACTION]
108
-
109
- If you encounter an RTP file with an unsupported record type, please contact me.
110
-
111
-
112
- == COPYRIGHT
113
-
114
- Copyright 2011-2013 Christoffer Lervåg
115
-
116
- This program is free software: you can redistribute it and/or modify
117
- it under the terms of the GNU General Public License as published by
118
- the Free Software Foundation, either version 3 of the License, or
119
- (at your option) any later version.
120
-
121
- This program is distributed in the hope that it will be useful,
122
- but WITHOUT ANY WARRANTY; without even the implied warranty of
123
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124
- GNU General Public License for more details.
125
-
126
- You should have received a copy of the GNU General Public License
127
- along with this program. If not, see http://www.gnu.org/licenses/ .
128
-
129
-
130
- == ABOUT THE AUTHOR
131
-
132
- * Name: Christoffer Lervåg
133
- * Location: Norway
134
- * Email: chris.lervag [@nospam.com] @gmail.com
135
-
136
- Please don't hesitate to email me if you have any feedback related to this project!