def setStageR(x, y, z, a)
puts "FEI setStageR"
- o,s = Open3.capture2("cscript vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
+ o,s = Open3.capture2("cscript ../../vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
position = o.lines.to_a[3]
puts position
return position
# exposuretime
ccdCamerasAcqParams.ExposureTime = 0.07
# imagesize
- ccdCamerasAcqParams.ImageSize = 2
+ ccdCamerasAcqParams.ImageSize = 0
# ---end
img255 = Array.new(imgLength){ Array.new(imgLength) }
- imgLength.times do |y|
- imgLength.times do |x|
- img255[y][x] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
+ imgLength.times do |x|
+ imgLength.times do |y|
+ img255[y][x] = ((imgData[x][y]-imgMin.to_f)*conversion).to_i
end
end
# ---end
+ puts imgLength
return img255.to_json
end
def setStageR(x, y, z, a)
puts "FEI setStageR"
- o,s = Open3.capture2("cscript vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
+ o,s = Open3.capture2("cscript ../../vem/tool/setStageR.js " + x.to_s + " "+ y.to_s + " " + z.to_s + " " + a.to_s)
position = o.lines.to_a[3]
puts position
return position
return imgData.to_json
end
- def acquisitiona255
+ def acquisition255
puts "FEI acquisition"
WIN32OLE.ole_initialize
# exposuretime
ccdCamerasAcqParams.ExposureTime = 0.07
# imagesize
- ccdCamerasAcqParams.ImageSize = 2
+ ccdCamerasAcqParams.ImageSize = 0
# ---end
img255 = Array.new(imgLength){ Array.new(imgLength) }
- imgLength.times do |y|
- imgLength.times do |x|
- img255[y][x] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
+ imgLength.times do |x|
+ imgLength.times do |y|
+ img255[x][y] = ((imgData[y][x]-imgMin.to_f)*conversion).to_i
end
end
# ---end
- puts "flag"
+ puts imgLength
return img255.to_json
end
# "#{result}"
end
- get '/:emname/set/setstager' do
+ get '/:emname/set/stager' do
headers \
"Access-Control-Allow-origin" => "*"
@@vem = VEM.create("#{params[:emname]}");
#!/usr/bin/env ruby -I c:/Users/iwasaki/gem/sinatra-master/lib -I lib
require 'sinatra/base'
-require './vem/vem'
+require '../../vem/vem'
#require './vem/hitachicontrol'
-require './vem/feicontrol'
+require '../../vem/feicontrol'
#require 'vem/jeolcontrol'
-require './vem/test'
+require '../../vem/test'
class Vemapi < Sinatra::Base