Text archives Help
- From: Jenny Simpson <simpson@cs.utah.edu>
- To: elconcha@yahoo.com
- Cc: scirun-users@sci.utah.edu
- Subject: [SCIRUN-USERS] Loading Dicom and Analyze files
- Date: Wed, 3 Mar 2004 23:44:58 -0700 (MST)
I'm working on improving the documentation for the Dicom and Analyze
readers right now. In the meantime, here is some information on getting
started. This is rough but hopefully it will help.
Reading Dicom and Analyze into SCIRun
-------------------------------------
1. Intro to using the Dicom and Analyze converters
The modules used to read Dicom and Analyze data into SCIRun are the
DicomToNrrd and AnalyzeToNrrd modules in the Teem package. A key point is
that these modules are dependent on the Insight package, so both
the Teem and Insight packages have to be enabled in your SCIRun build in
order for the readers to work. Instructions on building SCIRun with these
packages are included in the next section.
Both the DicomToNrrd and AnalyzeToNrrd modules require you to specify a
directory containing the files (a series of DICOM files or a single
Analyze file). If the files are recognized as valid Dicom or Analyze
format, they are read in and converted to the Nrrd format
(
http://teem.sourceforge.net/nrrd/index.html) which can then be used in
SCIRun nets.
2. Building SCIRun so that Dicom and Analyze converters are enabled
As mentioned previously, both the Teem and Insight packages have to be
enabled in order for the Dicom and Analyze readers to work. In order to
include packages in SCIRun, the packages have to be enabled using a
configure option when SCIRun is built. Specifics on how to do this are
linked here:
http://software.sci.utah.edu/doc/Installation/Guide/index.html. Enabling
the Insight package is a bit involved. It requires that you first install
ITK on your machine, then enable the Insight package when building SCIRun.
Here's some documentation on how to do it (there might be a new version of
this documentation available, if so I'll send a link). Also, I don't know
if/how these instructions would change if you're doing an rpm build of
SCIRun.
Building SCIRun with Insight and Teem
-------------------------------------
* Install Insight on your machine (download from
http://www.itk.org/).
Configure with
BUILD_SHARED_LIBS = ON
ITK_USE_SYSTEM_PNG = ON
* Verify you are using jdk 1.2.2 or higher
* Download xalan-j 2.5.1
You don't need to set your CLASSPATH, this will happen in the makefile.
* Download SCIRun
* Configure SCIRun similar to the following
../src/configure --enable-debug --enable-package="Teem Insight"
--with-insight=<path to ITK>
--with-xalan=<path to Xalan>
--with-thirdparty=<path to third party>
3. Brief overview of the Dicom and Analyze formats
Some background on the data formats will be helpful in understanding how
to load data using the readers. This is a quick and dirty description, so
by all means refer to the real format documentation for details. Also,
these formats tend to vary slightly so the descriptions I give are not
guaranteed to be universally applicable.
Dicom files contain 3D volume data, often from CT scans. Typically the
data for each volume is stored in a Dicom series, which is a set of files
that each contain a header and usually one frame of image data that
corresponds to a single slice from the scan. As a result, when loading
Dicom data using the DicomToNrrd module, one or more series' each
containing one or more files can be loaded.
Analyze files contain 3D volume data, often from MR scans. The Analyze
format includes two different files for each volume: a header (.hdr) file
and and image (.img) file. All of the image data for a volume is
contained in a single image file. Since these files come in pairs,
the AnalyzeToNrrd module requires that you specificy a .hdr file to
read. Then the module looks for the corresponding .img file in the same
directory as the .hdr file.
3. Using the DicomToNrrd and AnalyzeToNrrd modules
Once you've built SCIRun with the Teem and Insight packages enabled, you
should be able to use the DicomToNrrd and AnalyzeToNrrd modules to read
data. I don't have SCIRun running at the moment, so I don't remember
all the button names but you'll get the idea I hope. Here are the basic
steps involved in using each module:
DicomToNrrd:
- Use the module UI to browse to the directory containing
your Dicom files.
- If the data isn't loaded automatically, click the load
button below the browse button.
- In the left list box in the UI you
should see a list of Dicom series' that were detected in the directory you
specified. In the right list box you should see a list of files in the
currently selected series. If no valid Dicom series was found in the
specified directory, you'll see a message indicating this in the left
list box.
- To add an entire series to the set of data you want to process,
highlight a series id in the left list box and click "Add". To add only a
subset of the files in a series, highlight the series id in the left list
box and then highlight the series files you want in the right list box.
Then click "Add" to add just these files. A list of the files you have
added is provided in the bottom listbox. Keep in mind that if you add
multiple series', all series' have to have the same dimensions or you will
get an error.
- Click "Execute" to convert the data to Nrrd data which can be fed
downstream to a SCIRun module capable of reading Nrrd data. This is where
my expertise ends and hopefully the tutorials come in handy.
AnalzeToNrrd:
- Use the AnalyzeToNrrd module to select the .hdr file for the Analyze
data you wish to read into SCIRun. The module will look in the same
directory for the corresponding .img file.
- Click "Execute" to convert the data to Nrrd data which can be fed
downstream to a SCIRun module capable of reading Nrrd data.
4. Answers to common questions
Q: When using DicomToNrrd, I specify the directory containing my Dicom
files and when I attempt to load the files I get a message saying that no
Dicom series could be found. What's going on?
A: The DicomToNrrd module searched through the directory you specified and
couldn't find any files that looked like valid Dicom files. Here are some
possible causes: 1) It was late, you were tired, and you specified the
wrong directory, 2) the files in the directory aren't valid Dicom files,
3) the files in the directory are valid Dicom files with an unusual format
that the module had trouble recognizing. If after reading these causes
you don't know how to solve the problem, send mail to
<scirun-users@sci.utah.edu>.
Jenny
===========================================================================
== The SCIRun Users mailing list: send email to majordomo@sci.utah.edu ==
== for more details. ==
== Please acknowledge use of SCIRun in your papers and reports: ==
== see
http://software.sci.utah.edu/scirun-biopse_citation.bib ==
===========================================================================
- [SCIRUN-USERS] Loading Dicom and Analyze files, Jenny Simpson, 03/03/2004
Archive powered by MHonArc 2.6.16.