198 dimension = 16 * lineStippleRepeat
200 image = vtk.vtkImageData()
201 image.SetDimensions(dimension, 1, 1)
202 image.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 4)
203 image.SetExtent(0, dimension - 1, 0, 0, 0, 0)
207 while i_dim < dimension:
208 for i
in range(0, 16):
210 bit = (lineStipplePattern & mask) >> i
213 for j
in range(0, lineStippleRepeat):
214 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
215 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
216 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
217 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, off)
220 for j
in range(0, lineStippleRepeat):
221 image.SetScalarComponentFromFloat(i_dim, 0, 0, 0, on)
222 image.SetScalarComponentFromFloat(i_dim, 0, 0, 1, on)
223 image.SetScalarComponentFromFloat(i_dim, 0, 0, 2, on)
224 image.SetScalarComponentFromFloat(i_dim, 0, 0, 3, on)
226 self.
texture.SetInputData(image)
293 lineExists = lines.GetNumberOfCells() > 0
296 idList = vtk.vtkIdList()
297 idList.InsertNextId(self.
polyData.GetNumberOfPoints() - 1)
298 idList.InsertNextId(0)
299 self.
polyData.InsertNextCell(vtk.VTK_LINE, idList)
305 segmentationNode = self.
scriptedEffect.parameterSetNode().GetSegmentationNode()
311 self.
scriptedEffect.modifySelectedSegmentByLabelmap(modifierLabelmap, slicer.qSlicerSegmentEditorAbstractEffect.ModificationModeAdd)