Hi,
Sorry another question.
Just in the process of automating all my image analysis. I originally started with protocol blocks to work out workflow (which is very handy), but I've moved to javascript in the end to hopefully make it easier. I can find examples of accessing plugins from javascript for some stuff (Kmeans, thresholding, spot tracking), but some others I can't quite get how to get my sequence in and/or the result out. For instance, median filter doesn't give a sequence back, but there's no 'getSequence' function listed:
importClass(Packages.plugins.spop.medianfilter.MedianFilter)
//Split channels
Chns = []
Chns[0] = SequenceUtil.extractChannel(origSeq, 0)
Chns[1] = SequenceUtil.extractChannel(origSeq, 1)
Chns[2] = SequenceUtil.extractChannel(origSeq, 2)
//Median filter//
median = new MedianFilter();
medianChns = []
for(i = 0; i < Chns.length; ++i){
medianChns[i] = median.Median_filter_3D(Chns[i], 2)
}
I've also tried histogram equalisation (Packages.plugins.tlecomte.histogram.HistogramEqualization) with less success.
Is there a general way of handling these, or is the only option to harvest the original plugin code and modify it?
On a related note, is it sufficient to set a variable to nothing ("=[]") to unload that sequence from memory? Sorry, I'm learning javascript as I go.
Any help appreciated.
Cheers
Tamlyn