Description: The class, TMUtils was identified with Insufficient Modularization, hence few methods were extracted or removed from TMUtils and then created a new class with the name ThresholdUtils as it had a group of methods that help to calculate threshold values.
Methods that were extracted are getPercentile, getRange, getNBins, histogram, otsuThreshold, otsuThresholdIndex.
Note that after extraction, Insufficient Modularization smell was eradicated.
Extract Class:
Package Location: package fiji.plugin.trackmate.util;
Description: The class, TMUtils was identified with Insufficient Modularization, hence few methods were extracted or removed from TMUtils and then created a new class with the name ThresholdUtils as it had a group of methods that help to calculate threshold values. Methods that were extracted are getPercentile, getRange, getNBins, histogram, otsuThreshold, otsuThresholdIndex. Note that after extraction, Insufficient Modularization smell was eradicated.
Document Link : https://docs.google.com/document/d/1TEh2IvcwTXFVyL9KyT-EnExBwEG_jn8t26m_DSXt9FY/edit?usp=sharing
The above document has the refactoring information