0% found this document useful (0 votes)
213 views14 pages

CarpeDICOM Users Guide-W-Example Phantoms

This document provides a user guide for CarpeDICOM, a software tool for creating DICOM test data for treatment planning systems. It describes how to generate DICOM studies, series, and images using geometric objects and templates. It also covers reading, anonymizing, and comparing DICOM files. Key sections include default configurations, preferences, creating studies and image series, and generating plans, doses, and other specialized objects like X-ray angiographic images and structure sets.

Uploaded by

Jupiter Maistro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views14 pages

CarpeDICOM Users Guide-W-Example Phantoms

This document provides a user guide for CarpeDICOM, a software tool for creating DICOM test data for treatment planning systems. It describes how to generate DICOM studies, series, and images using geometric objects and templates. It also covers reading, anonymizing, and comparing DICOM files. Key sections include default configurations, preferences, creating studies and image series, and generating plans, doses, and other specialized objects like X-ray angiographic images and structure sets.

Uploaded by

Jupiter Maistro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 14

CarpeDICOM Users Guide

“Seize the DICOM”

Contents
1. Introduction to CarpeDICOM...............................................................................................................2

2. Default Configurations.........................................................................................................................2

3. Preferences..........................................................................................................................................2

4. Creating DICOM Phantoms..................................................................................................................2

4.1 Study................................................................................................................................................3

4.2 Image Series....................................................................................................................................3

4.3 Images.............................................................................................................................................3

4.4 Transformations and Registration Objects......................................................................................3

4.5 X-Ray Angiographic Image Series.....................................................................................................4

Positioner Primary Angle........................................................................................................................4

Positioner Secondary Angle....................................................................................................................4

Focal Points.............................................................................................................................................4

4.6 Structure Sets..................................................................................................................................4

4.7 Plans................................................................................................................................................4

4.7.1 General Treatment Aids..........................................................................................................4

4.7.2 Static vs. Dynamic Beam Types...............................................................................................5

4.7.3 Meterset Units (MUs)..............................................................................................................5

4.7.4 Spot Scanning..........................................................................................................................5

4.7.5 Brachytherapy Plans...............................................................................................................5

4.8 Dose.................................................................................................................................................6

5 Reading DICOM...................................................................................................................................6

5.1 Anonymization........................................................................................................................7

5.2 DICOM Information Display....................................................................................................7

5.3 Add / Remove and Copy / Paste Attributes............................................................................7


5.4 Find Attributes.........................................................................................................................7

5.5 Raw Pixel Sampling.................................................................................................................8

6 DICOM Repository Queries..................................................................................................................8

7 Comparing DICOM Files (CarpeCompare)............................................................................................9


1. Introduction to CarpeDICOM
CarpeDICOM is a DICOM phantom generation tool used for creating test data for treatment planning
systems. It is loosely based on the pre-existing POSDA phantom creation library for Linux. Information
regarding POSDA can be found at http://posda.com/Posda/Welcome.html. The series generation
portion of code from POSDA was ported to .NET and revamped to support CarpeDICOM’s UI. The result
is a visual phantom creation engine with added functionality including support for XA Series, RTIONPLAN
Series, brachytherapy plans and a host of plan treatment aids.

2. Default Configurations
Much like POSDA, CarpeDICOM uses a handful of configuration files to populate values for each
modality supported. There exists at least one configuration file for each modality. Modalities such as
plans have more due to their multiple nested sequences. Any tag represented in a configuration file will
be added to the resultant DICOM corresponding to that configuration.

Each DICOM record is constructed by importing all the tags found in the Study.config file then the
corresponding series configuration tags. In the case of non-brachytherapy plans, the Beam.config and
BeamSegment.config are used to populate beam objects and their control points.

All configuration files are written in XML with the tags grouped by Group number. Certain tags are
calculated within CarpeDICOM and are therefore not included in the configurations.

DataSetParameters.config

The DataSetParameters configuration file contains parameters describing the dimensions of the
phantom space and its reference frame. Changes made to this file affect all subsequent studies.
Image orientation (patient) is defined here as is gantry tilt and the origin of the reference frame.

3. Preferences
The Preferences dialog found under Edit | Preferences… specifies phantom creation parameters. The
default write directory is defined here as well as the error logging location. Internal errors of any
severity are logged to this file for debugging purposes.

The transfer syntax use when creating phantoms may also be defined here. See section 10 of Part 5:
Data Structures and Encoding of the DICOM Standard for more information regarding transfer syntax.

Whether the UIDs are refreshed automatically after a phantom is created can also be specified in this
dialog.

4. Creating DICOM Phantoms


The physical properties of the phantom and its image space are designated in the Create Phantom
dialog found under File | New Phantom… Phantoms are constructed as a collection of simple geometric
objects, each given an interpreted type, pixel value and dose value. The pixel and dose values defined
here are the raw values written to the data and are not to be confused with Hounsfield or Standardized
Uptake values which are the result of rescaling.

Phantom parameters can be saved and reloaded within the Create Phantom dialog by selecting File |
Save Template. To open a saved template, either drag and drop the template file (*.cdcm) into the
Overview pane on in the main window or select File | Open Template in the Create Phantom dialog.

Note: X coordinate is left-Right, Y coordinate is NEGATIVE towards the anterior direction.

After a geometric object has been added to the list of phantom objects, it can be removed and placed
back into the parameter editing panel simply by highlighting the object and clicking “-“.

The parameters in the Spatial Extents section define the imaging area centered on the origin. The
phantom objects will be encoded in the pixel data according to which Patient Position and Slice
Orientation is selected at create time.

Once the list of object are created, you can enter the patient ID and the select to “add CT Series”, or any
other modality

Example: creating a phantom with a step of air (HU= -1000) on the front surface.

Will create this


Example two: creating a 2 cm slab of lung of density 0.5, HU=-480, on the upper right, at 2 cm depth.
More complex shapes can be created by addition of structures, like an L-shape Bone slab HU=1488
4.1 Study
The tags listed in the Study Tag View are for the most part only what are found in the Study.config
file. Study date and time are set to the moment when the phantom is created. The Study Instance
UID is generated when the study is created. These tags are included in each file that is part of the
study and editing one on this page will change it for every file.

4.2 Image Series


Tags listed in the Image Series Tag View are shared between all images in the series. Changing a tag
here will change its value for each image in the series. However, image data will not be recalculated
for changes to these values.

4.3 Images
The Image Tag View contains every tag for the selected image that will be written out to file. Editing
a tag value here that is shared between images in an image series will change that value for each
image containing that tag. Overlapping ROI regions will have the pixel value of the last added ROI in
the overlap.

The Image View displays the image data in the Pixel Data tag. The range of displayable pixel values
is 0 to 32768, black being 0 and white being 32768.

* Note: A GDI+ API limitation causes pixel values between 32768 and 65536 to display in
CarpeDICOM as 0. Pixel values in this range will still be written out to file correctly.

*Note: Image data is created using 16 bits per pixel, regardless of what the Bits Allocated tag is set
to.

4.4 Transformations and Registration Objects


An image series may be transformed by right-clicking a pre-existing series and selecting “Transform
Image Series”. Rotations and translations are preformed in the following order:

Translated Phantom = TranslateXYZ ( RotateXY ( RotateXZ ( RotateYZ ( Phantom) ) ) )

A transformed image series and with a registration object relating the original and transformed
series will be produced. The registration object will contain two transformation matrices, the first
relating the frame of reference (FOR) of the registration object to the FOR of the original image
series. The second matrix relates the FOR of the translated image series to the original series.

4.5 X-Ray Angiographic Image Series


Right-clicking a study and selecting “Add XA Series” will bring up the X-Ray Angiograph dialog. Two
images are created for each XA series, the first a projected view of the phantom taken from camera
vantage point directly above with the top of the image toward the gantry for a Primary Angle of
zero. The second image is a projected view 90 degrees greater than the Primary Angle of the first
image, the top of the image still towards the gantry. Images are normalized to the range between
zero and the value indicated in the Normalize to: field.

Positioner Primary Angle


The Primary Angle represents rotations much like gantry rotations. For positive increments in
Primary Angle, the camera rotates clockwise around the Z-axis as would the gantry rotate.

Positioner Secondary Angle


The Secondary Angle represents rotations much like couch pitch rotations. Positive increments
in the Secondary Angle rotate the camera in the direction of the gantry around the X-axis.

* See section C.8.7.5.1.2 in Part 3: Information Object Definitions of the DICOM Standard for
more information regarding Positioner Primary and Positioner Secondary Angles.

Focal Points
If Use Focal Point is selected, images will be calculated using a focal point-based projection
algorithm. The focal point will reside a distance of Focal Length from the XA image plane with
the phantom in between. The mid-point of the line of focus from the focal point to the center
of the XA image plane will always reside at the image space origin.

4.6 Structure Sets


The Structure Set View contains the list of Regions of Interest (ROI) that make up the phantom as
well as the tags for the structure set. An ROI will exist for each object making up the phantom. ROI
details are displayed by selecting an ROI from the list. Contouring is done for each ROI on each
image slice using a Marching Squares algorithm.

4.7 Plans

4.7.1 General Treatment Aids


Bolus – If the external object of the phantom is a prism, a bolus will be added to the entire study
and thus appear in the images, structure set and dose. The bolus will be 50mm thick and %90 of
the length and width of the external prism. If there is no external object or prism, the bolus will
not be added to the study but only appear in the plan.

Block – By default, block data is calculated to envelop the open field. The extents of the block
will be within the area of the Jaws, the greatest left MLCX leaf position and least right MLCX leaf
position.

Compensator – The position is calculated from the number of compensator rows, columns and
pixel spacing defined in the Beam.config file. The thickness and transmission default to 50mm
and 0.5, respectively. If the Compensator Mounting Position is set to DOUBLE_SIDED, Source to
Compensator Distance data will be calculated and default to 200mm for each pixel.

Wedge – When a wedge is added to a beam, the option to include the wedge in any control
point for that beam becomes available.

4.7.2 Static vs. Dynamic Beam Types


Static beams are defined as having no movement in the gantry, collimator or couch while the
beam is delivering dose. Therefore a control point is needed at the start and end of dose
delivery, the first describing the machine state and the second describing the amount of dose
delivered. This is why the total number of control points for static beams is always even. Two
points together define a segment. Between segments while the machine is not delivering dose,
the machine or couch is allowed to move.

Dynamic beams allow movement while the beam is delivering dose. Therefore the total number
of control points for dynamic beams does not have to be even.
For static beams, CarpeDICOM adds control points in pairs. By default, the second control point
will have a meterset weight of zero.

For dynamic beams, control points are added individually.

4.7.3 Meterset Units (MUs)


MUs assigned to a control point are delivered between that control point and the subsequent
control point. The last control point in a beam does not deliver any MUs and is not included in
the Final Cumulative Meterset Weight calculation.

4.7.4 Spot Scanning


Spot scanning only applies to RT Ion Plans with a Scan Mode set to Modulated. By default, there
are 100 spot scans distributed in a 10 x 10 square of scans with extents 5mm inside the jaw
positions. Spot Scan Meterset Weights for each scan is the Final Cumulative Meterset Weight
divided by the number of spot scans.

4.7.5 Brachytherapy Plans


As defined by the standard, each application setup contains the channel sequence and each
channel contains a control point sequence. The RT Brachy Plan details view is laid out with that
relationship in mind. Selecting an application setup will display just the channels for that setup.
Selecting a channel will display only the control points for that channel. Sources are a separate
entity employed by the channels and a sequential relationship does not apply.

The enumerated sources available for use have been modeled on real isotope data. Sources
that are primarily gamma-emitting will not have a Source Strength value and those that are
primarily beta-emitting will. Additionally, Source Strength Units will be AIR_KERMA_RATE for
gamma sources and DOSE_RATE_WATER for beta.

When adding a channel to an application setup, the selected source will be used in that channel.

If the Brachy Treatment Type is set to PDR, pulse-related tags are added to the channel
sequence. The Number of Pulses value defaults to 25 and Pulse Repetition Interval to 50.

If Source Movement Type is set to STEPWISE, a channel’s Source Applicator Step Size will be
added to the channel sequence and default to 5mm.

4.8 Dose
The Dose Data View displays the dose data for the selected longitudinal position from the Grid
Frame Offset Vector. Pixel Rows, Columns and Spacing are the same as those used for the image
series pixels. The dose values are the raw values from the Pixel Data before scaling. Pixels are 16
bits regardless of what Bits Allocated is set to.

For overlapping ROIs, the dose in the intersecting region will be dose of the last added ROI.
5 Reading DICOM
Existing DICOM files may be read in and displayed by either selecting File | Open Patient… to read in a
directory of DICOM or File | Open File… to read a single file; or drag and drop a file or directory into the
Overview pane on the left-hand side of the tool.

* Note: Explicit Big Endian transfer syntaxes may cannot be read.

Files are displayed in the Overview pane in hierarchical order, highlighting the referential integrity
between series for a study.

 If a file references another but that file does not exist in the data set, it will show up in red.

 If a file has multiple references, the file will be displayed under the first reference and will
show up yellow.

 If a file has an SOP Instance UID that matches another file in the dataset, both files will show
up orange.

The shared attributes for a study and series are displayed in the study and series items, respectively.
Attributes that appear in all files within a study or series but have differing values will appear with
“<Values Differ>” as the value. Edits made to attributes in a study or series item will be applied to all
files within that study or series.

While in ‘Read’ mode, a number of options are available that were not in ‘Create’ mode.

5.1 Anonymization
Data may be anonymized by selecting Edit | Anonymize… By default, the anonymization routine
will only anonymize Names (VR=PN), Dates and Times (VR=TM, DA), UIDs (VR=UI) and any attribute
in the patient demographic group (0x0010). Names and UIDs are randomly generated and Dates
and Times are set to the current date/time.

The anonymization dialog allows for additional anonymization by way of the Anonymize.config file.
Attributes included in this configuration file will also be randomly anonymized in keeping with the
allowable value length for the VR of the tag.

The “Remove Private Attributes” option is selected by default and will remove attributes that are
not found in the DICOM standard dictionary. Be aware that un-selecting this may allow patient
information residing in the private tags to persist into the anonymized data.

* Note: Patient information burnt into images (such as DRRs) will NOT be removed.
5.2 DICOM Information Display
Information from the DICOM standard may be displayed while viewing DICOM instances by
selecting Tools | Display Info. With this option displayed, hovering the mouse over an attribute
will show the allowable VM range, VR type and length, IOD and module name, tag type and
description.

If you need more information, the DICOM standard along with the IEC standard are also available
under Help | DICOM Standards.

5.3 Add / Remove and Copy / Paste Attributes


Attributes may be added or removed at the study, series or instance level. Right click the tag view
and select Add or Remove to insert or remove an attribute. The remove dialog will give you the
option of removing all matching attributes within the study, series or instance or just that attribute
highlighted.

At the instance level, attributes may be copied and pasted between instances by right-clicking the
tag(s) and selecting Copy or via the shortcut Ctrl+c. To paste attributes on the clipboard,
highlighting the sequence or neighboring attributes you would like to paste in or near, right-clicking
and selecting Paste or by way of the shortcut Ctrl+v.

5.4 Find Attributes


To search for an attribute in a study, series or instance, right-click the attribute view and select Find
Attribute… Any matching attribute will be highlighted when found.

5.5 Raw Pixel Sampling


To sample pixel values from an image or dose, select the Image View tab when displaying the file
and click the point in the image you wish to sample. The selected pixel will be highlighted in green
and the raw values will be displayed along with the location of the pixel in the image.

6 DICOM Repository Queries


To search the DICOM repository you must first ensure you can connect to \\10.137.115.124 via the
network. CarpeDICOM will attempt to make this connection on starting up and if it is unable to do
so the File | Search Database… item will be disabled. If it is enabled, you are connected to this
server.
Select File | Search Database… to bring up the search dialog or right-click a group of highlighted
attributes you wish to base your search on and select Search Database…

Simple Queries:

For simple queries, enter the group and element number along a value you wish to search on. If
no value is entered, the search will look for all files with that attribute regardless of its value.
Press search to initiate the search.

Advanced Queries:

Select the Advanced tab and enter your SQL query into the text box. Hit Search to initiate the
search.

For the database schema, please contact Ryan Renne.

* Note: In order to load data from an advanced query, ensure you include the “PatientID” and
“FilePath” columns found in the DCMRecord table.

To load a file, highlight the file and hit “Load File”. Only that file will be loaded. To load the dataset
containing a file matching your query, highlight a file and hit “Load Patient” to load that file and all
other files associated with its Patient ID.

Files loaded will be copied locally to the hidden directory .dbTemp in the write location specified in
Edit | Preferences…

* Note: Loading data will cause CarpeDICOM to copy it locally across the network, a task that may
take a while for overseas users.

7 Comparing DICOM Files (CarpeCompare)


To compare attributes between two files, select the first file you wish to compare against in
CarpeDICOM. Then select Tools | Compare DICOM… to bring up the DICOM comparison dialog.
The file path for the other file being compared must then be entered into the DICOM File 2 text box.
Hit compare to view the differences between files.

Rows will display in red if the value of an attribute between both files differs. If one file contains the
attribute but the other does not, that attribute will display grey.

Images and doses are visually diffed in the Images or Doses tabs, respectively. The left-most image
is the difference image. Two images or doses with a different number of rows, columns, transfer
syntaxes or bits allocated will not be diffed. Matching pixels between images or doses will appear
pink, and close matches will appear white. The more different the pixel, the closer to black the pixel
will appear.
CarpeCompare works as a standalone tool as well and does not have to be accessed through
CarpeDICOM.

You might also like