Sha256: b453befd17d3be5d0193453264152a19236bc6e6fc43cdba4abd3318479f3d8e
Contents?: true
Size: 1.43 KB
Versions: 6
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' describe 'handling T stage images' do let(:image) { ImageHelpers.t_stage } let(:sqed) do Sqed.new( image: image, pattern: :t, boundary_color: :red, has_border: false ) end let(:m) do { 0 => 'annotated_specimen', 1 => 'identifier', 2 => 'image_registration' } end context 'simple boundaries - without thumbnail' do let(:s) { Sqed.new( image: image, metadata_map: m, use_thumbnail: false, layout: :t, boundary_finder: Sqed::BoundaryFinder::ColorLineFinder, boundary_color: :red, has_border: false ) } specify 'boundaries are reasonable' do s.result c = s.boundaries.coordinates c.each do |section, values| c[section].each_with_index do |v, i| msg = "section #{section}, index #{i} has a bad value '#{v}'" expect(v > -1).to be_truthy, msg end end end end context 'boundaries - with_thumbnail' do let(:s) { Sqed.new( image: image, use_thumbnail: true, pattern: :t, boundary_color: :red, has_border: false ) } specify 'boundaries are reasonable' do s.result c = s.boundaries.coordinates c.each do |section, values| c[section].each_with_index do |v, i| msg = "section #{section}, index #{i} has a bad value '#{v}'" expect(v > -1).to be_truthy, msg end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems