panomosity 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/panomosity.rb +4 -0
- data/lib/panomosity/runner.rb +12 -2
- data/lib/panomosity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc51adbd45db0cbb937f28da56b8a589f633d0ce9cccccf885281536f6e24c9e
|
|
4
|
+
data.tar.gz: 651e257e87f066cd469c7cd1810dde92ed8674a3c68cec8210c59d009f59f38f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbda70377b5cf21a0f7c0b4cafadc18d6851143e5cafa7872f1332f126368df9b5182a11bfa0f8c00bed9572706b1cd5aa64a046e064ad29a354c34b5311a7b6
|
|
7
|
+
data.tar.gz: 294e882e7e3ee22a34e41c23db1c72091ad19467254e64ef85be40251f5bafa33b0c00415293f573ed18863eae4f6eb22ed83d3d54698793aa626f5e397e1078
|
data/lib/panomosity.rb
CHANGED
|
@@ -70,6 +70,10 @@ module Panomosity
|
|
|
70
70
|
options[:report_type] = type
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
parser.on('--darwin', 'Sets a flag to indicate the operating system') do |type|
|
|
74
|
+
options[:darwin] = type
|
|
75
|
+
end
|
|
76
|
+
|
|
73
77
|
parser.on('-h', '--help', 'Display this screen') do
|
|
74
78
|
puts parser
|
|
75
79
|
exit
|
data/lib/panomosity/runner.rb
CHANGED
|
@@ -501,7 +501,7 @@ module Panomosity
|
|
|
501
501
|
images = Image.parse(@input_file)
|
|
502
502
|
res = @options[:res] || 'low'
|
|
503
503
|
columns = images.map(&:column).uniq.sort
|
|
504
|
-
columns.
|
|
504
|
+
commands = columns.map do |column|
|
|
505
505
|
@output = "project_nona_c#{column}.pto"
|
|
506
506
|
@output_file = File.new(@output, 'w')
|
|
507
507
|
logger.debug "creating file #{@output}"
|
|
@@ -515,9 +515,19 @@ module Panomosity
|
|
|
515
515
|
end.compact
|
|
516
516
|
save_file
|
|
517
517
|
logger.debug "running nona #{@output}"
|
|
518
|
-
output =
|
|
518
|
+
output = "nona --save-intermediate-images --intermediate-suffix=intermediate -v -m TIFF_m --seam=blend #{@output} -o #{res}_res_stitch_section_c#{column.to_s.rjust(5, '0')}_"
|
|
519
519
|
logger.debug output
|
|
520
|
+
output
|
|
520
521
|
end
|
|
522
|
+
|
|
523
|
+
logger.debug 'parallelizing'
|
|
524
|
+
if @options[:darwin]
|
|
525
|
+
parallel_command = "cat <<'EOF' | parallel \n#{commands.join("\n")}\nEOF"
|
|
526
|
+
else
|
|
527
|
+
parallel_command = "cat <<'EOF' | parallel -j $(fgrep -c processor /proc/cpuinfo) \n#{commands.join("\n")}\nEOF"
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
`#{parallel_command}`
|
|
521
531
|
end
|
|
522
532
|
|
|
523
533
|
def optimize
|
data/lib/panomosity/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: panomosity
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oliver Garcia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|