Page History
Wiki Markup |
---|
*1. |
...
Answer for MAX Installation Questions. |
...
* The best way to know if the installation is correct is to enter the following command: |
...
\\ \\ ./max.pl \--help |
...
\\ If it shows the in-line help text (over 800 lines of text), the installation is correct. |
...
If some of the Perl modules are missing, you will see errors that look like... |
...
\\ Can't locate Math/Polygon/Calc.pm in @INC (@INC contains: /usr/lib/perl5/... |
...
/usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi ... |
...
BEGIN failed--compilation aborted at ... |
...
\\ MAX is written in Perl. |
...
*2. Additional Perl Modules Needed for MAX. |
...
* It looks like there are some Perl modules that need to be installed. |
...
And, yes, you can get them from CPAN (cpan.org): |
...
\\ \\ XML::Twig |
...
Tie::IxHash |
...
Math::Polygon::Calc |
...
\\ (These are referenced by the "use" statements in the Perl code.) |
...
After installing these 3 modules, you should be able to get the correct output when you type "./max.pl --help". |
...
- >I downloaded XML-Twig-3.32.tar.gz, |
...
I'm using version 3.16, but I don't think this will be a problem. |
...
\\ Twig might have some dependencies; if so, you'll have to install some other modules. |
...
For example, if you see an error message that says that it couldn't find XML/Xpath.pm, that means that you would need to download and install XML::Xpath also. |
...
>Tie-IxHash-1.21.tar.gz and Math-Polygon-1.00.tar.gz. |
...
These are the same version that I'm using. |
...
\\ *3. Install Additional Perl Modules in User Specified Directory Instead of the System Directory |
...
* You can actually install the Perl modules anywhere \-\- for example, in your home directory, but maybe even better is to install them in MAX's directory. |
...
This article... |
...
[http://tnerd.com/2008/10/26/perl-how-to-install-perl-modules-in-few-quick-steps/ |
...
] looks like it has a pretty good procedure for doing this using CPAN, but it does look a little complicated. I've never done it quite this way; instead, I just install modules manually. If you want to do it manually, read the section of this article under "Manual installation of the module as a normal user under home directory". Before doing this, you should decide on a directory that will hold all the Perl modules. Then read this section: "set the environment variable PERL5LIB pointing to the home directory" to tell Perl where the new modules will be located. \\ \\ *4. Using MAX* \\ \\ MAX will analyze the XML files and will perform nodule matching. I believe that the XML files that you get from us are in the form of a single file that contains the unblinded reads from 4 LIDC sites merged into one file. If so, here's an example of how you would run MAX to do the matching: max.pl \--fname mergedfile.xml \--skip-num-files-check |
...
\--pixel-size=0.7 \--slice-spacing=1.0 \--xml-ops= |
...
none or since MAX lets you abbreviate most of the command line options, this also works... max.pl \--fname mergedfile.xml \--skip \--pixel=0.7 \--slice=1.0 \--xml-ops= |
...
* You might need to include a path on MAX depending on how and where it was installed.
* You might need to include a path to the merged file. But you will probably run MAX from the directory that contains the file.
* Instead of the values shown above, you will have to get the *true* pixel and slice spacing for the series that corresponds to the merged file. **MAX will not work properly unless you have the correct values for both** You can get the values from looking at the DICOM files. Note that you'll have to look at two adjacent files to get the slice spacing; there is no single DICOM tag that gives this value.
...
none A couple of comments: \* You might need to include a path on MAX depending on how and where it was installed. \* You might need to include a path to the merged file. But you will probably run MAX from the directory that contains the file. \* Instead of the values shown above, you will have to get the \*true\* pixel and slice spacing for the series that corresponds to the merged file. \*\**MAX will not work properly unless you have the correct values for both*\** You can get the values from looking at the DICOM files. Note that you'll have to look at two adjacent files to get the slice spacing; there is no single DICOM tag that gives this value. \* Just for testing, I recommended that you run MAX with "--xml-ops=none" as shown above which prevents any XML files from being written. |
...
We can talk about this later. |
...
So for now, all the results (along with A LOT of other info) will be printed to the screen. |
...
5. pixel-size and slice-spacing
...
\\ 5. *slice-spacing* Error (6501) results if the slice spacing is wrong. Here's one way to get the slice spacing from the DICOM images: The most reliable DICOM tag to use is "Image Position Patient" (0020,0032). |
...
A typical dump of this tag from an image looks like this: |
...
0020 0032 34 // REL Image Position Patient//-209.800003-193.600006-72.199997 |
...
It is a Type 1 tag, so it's always going to be present and should be reliable. |
...
Since CT images are axials, the z position of each image is the final coordinate number: \-72.2mm in this case. |
...
The most reliable way of doing this is to extract the z coordinates from all the images, sort them, and then see what the delta-z value is. |
...
(Watch out when parsing these lines: The "\" can cause problems if the numeral immediately following it is a 0 (zero). |
...
In many programming/scripting situations, "\0" represents a null which could signal the end of the string\!\!)\\ *6. pixel-size* <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-1610611985 1073750091 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {mso-style-noshow:yes; mso-style-priority:99; mso-style-link:"Plain Text Char"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; font-family:Consolas; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} span.PlainTextChar {mso-style-name:"Plain Text Char"; mso-style-noshow:yes; mso-style-priority:99; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Plain Text"; mso-ansi-font-size:10.5pt; mso-bidi-font-size:10.5pt; font-family:Consolas; mso-ascii-font-family:Consolas; mso-hansi-font-family:Consolas;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-1610611985 1073750091 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {mso-style-noshow:yes; mso-style-priority:99; mso-style-link:"Plain Text Char"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.5pt; font-family:Consolas; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} span.PlainTextChar {mso-style-name:"Plain Text Char"; mso-style-noshow:yes; mso-style-priority:99; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Plain Text"; mso-ansi-font-size:10.5pt; mso-bidi-font-size:10.5pt; font-family:Consolas; mso-ascii-font-family:Consolas; mso-hansi-font-family:Consolas;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> Here's a dump from a DICOM file:\\ 0028 0030 30 // IMG Pixel Spacing//007.421880e-01\007.421880e-01 Once again, watch out for the "\"\!\! Note that this tag gives the spacing in both in-plane directions, but our pixels always seem to be square, so we don't need both numbers. \\ |