192 dimension = 16 * lineStippleRepeat
194 image = vtk.vtkImageData()
195 image.SetDimensions(dimension, 1, 1)
196 image.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 4)
197 image.SetExtent(0, dimension - 1, 0, 0, 0, 0)
201 while i_dim < dimension:
202 for i
in range(0, 16):
204 bit = (lineStipplePattern & mask) >> i
207 for j
in range(0, lineStippleRepeat):
208 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
209 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
210 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
211 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, off)
214 for j
in range(0, lineStippleRepeat):
215 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
216 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
217 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
218 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, on)
220 self.
texture.SetInputData(image)
287 lineExists = lines.GetNumberOfCells() > 0
290 idList = vtk.vtkIdList()
291 idList.InsertNextId(self.
polyData.GetNumberOfPoints() - 1)
292 idList.InsertNextId(0)
293 self.
polyData.InsertNextCell(vtk.VTK_LINE, idList)
299 segmentationNode = self.
scriptedEffect.parameterSetNode().GetSegmentationNode()
305 self.
scriptedEffect.modifySelectedSegmentByLabelmap(modifierLabelmap, slicer.qSlicerSegmentEditorAbstractEffect.ModificationModeAdd)