def threshold(self,threshold=128,invert=False):
        out = []
        high = 255
        low = 0
        if( invert ):
            high = 0
            low = 255
        for pt in self:
            if( pt < threshold ):
                out.append(low)
            else:
                out.append(high)
        retVal = LineScan(out,image=self.image,pointLoc=self.pointLoc,pt1=self.pt1,pt2=self.pt2)
        retVal._update(self)
        return retVal
**SUMMARY**
dataset/ETHPy150Open sightmachine/SimpleCV/SimpleCV/LineScan.py/LineScan.threshold