-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from SimonRit/WrappingGeometryReaders
Wrapping geometry readers
- Loading branch information
Showing
8 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
import argparse | ||
import sys | ||
import itk | ||
from itk import RTK as rtk | ||
|
||
if __name__ == '__main__': | ||
# Argument parsing | ||
parser = argparse.ArgumentParser(description= | ||
"Creates an RTK geometry file from a Varian OBI acquisition.") | ||
|
||
parser.add_argument('--verbose', '-v', help='Verbose execution', type=bool) | ||
parser.add_argument('--xml_file', '-x', help='Varian OBI XML information file on projections') | ||
parser.add_argument('--output', '-o', help='Output file name') | ||
parser.add_argument('--path', '-p', help='Path containing projections', required=True) | ||
parser.add_argument('--regexp', '-r', help='Regular expression to select projection files in path') | ||
|
||
args = parser.parse_args() | ||
|
||
if args.xml_file is None or args.output is None: | ||
parser.print_help() | ||
sys.exit() | ||
|
||
names = itk.RegularExpressionSeriesFileNames.New() | ||
names.SetDirectory(args.path); | ||
names.SetRegularExpression(args.regexp); | ||
|
||
reader = rtk.VarianObiGeometryReader.New() | ||
reader.SetXMLFileName(args.xml_file) | ||
reader.SetProjectionsFileNames(names.GetFileNames()) | ||
reader.UpdateOutputData() | ||
|
||
xmlWriter = rtk.ThreeDCircularProjectionGeometryXMLFileWriter.New() | ||
xmlWriter.SetFilename(args.output) | ||
xmlWriter.SetObject(reader.GetGeometry()) | ||
xmlWriter.WriteFile() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::BioscanGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::DigisensGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::ElektaSynergyGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::OraGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::VarianObiGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::VarianProBeamGeometryReader" POINTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
itk_wrap_simple_class("rtk::XRadGeometryReader" POINTER) |