MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / example3

Function example3

Examples/SimpleIO/SimpleIO.rb:47–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45end
46
47def example3()
48 require 'simpleitk'
49
50 #START_PROCEDURAL_TRANSFORM_READER_WRITER_EXAMPLE
51 basic_transform = Simpleitk::Euler2DTransform.new
52 trans = Simpleitk::VectorDouble.new
53 trans << 2.0
54 trans << 3.0
55 basic_transform.set_translation(trans)
56
57 file_name = 'euler2D_rb.tfm'
58 Simpleitk::write_transform(basic_transform, file_name)
59 read_result = Simpleitk::read_transform(file_name)
60
61 raise "This shouldn't happen." unless basic_transform.class != read_result.class
62 #END_PROCEDURAL_TRANSFORM_READER_WRITER_EXAMPLE
63end
64
65if ARGV.length != 2 then
66 puts "Usage: SimpleIO <input> <output>";

Callers 2

MainMethod · 0.70
SimpleIO.rbFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected