194 dimension = 16 * lineStippleRepeat
196 image = vtk.vtkImageData()
197 image.SetDimensions(dimension, 1, 1)
198 image.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 4)
199 image.SetExtent(0, dimension - 1, 0, 0, 0, 0)
203 while i_dim < dimension:
204 for i
in range(0, 16):
206 bit = (lineStipplePattern & mask) >> i
209 for j
in range(0, lineStippleRepeat):
210 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
211 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
212 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
213 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, off)
216 for j
in range(0, lineStippleRepeat):
217 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
218 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
219 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
220 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, on)
222 self.
texture.SetInputData(image)
289 lineExists = lines.GetNumberOfCells() > 0
292 idList = vtk.vtkIdList()
293 idList.InsertNextId(self.
polyData.GetNumberOfPoints() - 1)
294 idList.InsertNextId(0)
295 self.
polyData.InsertNextCell(vtk.VTK_LINE, idList)
301 segmentationNode = self.
scriptedEffect.parameterSetNode().GetSegmentationNode()
307 self.
scriptedEffect.modifySelectedSegmentByLabelmap(modifierLabelmap, slicer.qSlicerSegmentEditorAbstractEffect.ModificationModeAdd)