Class: RImageAnalysisTools::CentromereFindingMethod
- Inherits:
-
Method
- Object
- Method
- RImageAnalysisTools::CentromereFindingMethod
show all
- Defined in:
- lib/rimageanalysistools/method/centromere_finding_method.rb
Instance Attribute Summary
Attributes inherited from Method
#input_images, #metadata, #output_images, #parameters, #quantification
Instance Method Summary
collapse
Instance Method Details
#centromere_finding(im) ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/rimageanalysistools/method/centromere_finding_method.rb', line 44
def centromere_finding(im)
im = ImageFactory.createWritable(im)
filters = []
filters << LocalMaximumSeparabilityThresholdingFilter.new
filters << LabelFilter.new
filters << RecursiveMaximumSeparabilityFilter.new
filters << RelabelFilter.new
filters << SizeAbsoluteFilter.new
filters << RelabelFilter.new
filters.each do |f|
f.setParameters(parameters)
f.setReferenceImage(input_images.getMarkerImage)
f.apply(im)
end
im
end
|
#go ⇒ Object
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/rimageanalysistools/method/centromere_finding_method.rb', line 78
def go
mask = ImageFactory.createWritable(input_images.getMarkerImage)
normalize_input_image(mask)
bf = BandpassFilter.new
bf.setParameters(parameters)
band_lower = 3.0
band_upper = 4.0
bf.setBand(band_lower, band_upper)
bf.apply(mask)
mask = centromere_finding(mask)
m = IntensityPerPixelMetric.new
q = m.quantify(mask, input_images)
self.quantification= q
mask
end
|
69
70
71
72
73
74
75
|
# File 'lib/rimageanalysistools/method/centromere_finding_method.rb', line 69
def normalize_input_image(im)
rnf = RenormalizationFilter.new
rnf.setParameters(parameters)
rnf.apply(im)
end
|