6e2d0c57f5657525b1647d59b65d80058af11025,dipy/viz/fvtk.py,,slicer,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,1496

Before Change


    // An outline provides context around the data.
    outlineData = vtk.vtkOutlineFilter()
    // outlineData.SetInputConnection(im.GetOutputPort())
    outlineData.SetInput(im)
    mapOutline = vtk.vtkPolyDataMapper()
    mapOutline.SetInputConnection(outlineData.GetOutputPort())
    outline = vtk.vtkActor()
    outline.SetMapper(mapOutline)

After Change


    // An outline provides context around the data.
    outlineData = vtk.vtkOutlineFilter()
    // outlineData.SetInputConnection(im.GetOutputPort())
    if major_version <= 5:
        outlineData.SetInput(im)
    else:
        outlineData.SetInputData(im)
    mapOutline = vtk.vtkPolyDataMapper()
    mapOutline.SetInputConnection(outlineData.GetOutputPort())
    outline = vtk.vtkActor()
    outline.SetMapper(mapOutline)
    outline.GetProperty().SetColor(1, 0, 0)

    // Now we are creating three orthogonal planes passing through the
    // volume. Each plane uses a different texture map and therefore has
    // diferent coloration.

    // Start by creatin a black/white lookup table.
    lut = vtk.vtkLookupTable()
    lut.SetTableRange(vol.min(), vol.max())
    lut.SetSaturationRange(0, 0)
    lut.SetHueRange(0, 0)
    lut.SetValueRange(0, 1)
    lut.SetRampToLinear()
    lut.Build()

    x1, x2, y1, y2, z1, z2 = im.GetExtent()

    // print x1,x2,y1,y2,z1,z2

    // Create the first of the three planes. The filter vtkImageMapToColors
    // maps the data through the corresponding lookup table created above.
    // The vtkImageActor is a type of vtkProp and conveniently displays an
    // image on a single quadrilateral plane. It does this using texture
    // mapping and as a result is quite fast. (Note: the input image has to
    // be unsigned char values, which the vtkImageMapToColors produces.)
    // Note also that by specifying the DisplayExtent, the pipeline
    // requests data of this extent and the vtkImageMapToColors only
    // processes a slice of data.
    planeColors = vtk.vtkImageMapToColors()
    // saggitalColors.SetInputConnection(im.GetOutputPort())
    if major_version <= 5:
        planeColors.SetInput(im)
    else:
        planeColors.SetInputData(im)
    planeColors.SetLookupTable(lut)
    planeColors.Update()

    saggitals = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: nipy/dipy
Commit Name: 6e2d0c57f5657525b1647d59b65d80058af11025
Time: 2013-08-02
Author: garyfallidis@gmail.com
File Name: dipy/viz/fvtk.py
Class Name:
Method Name: slicer


Project Name: nipy/dipy
Commit Name: 6e2d0c57f5657525b1647d59b65d80058af11025
Time: 2013-08-02
Author: garyfallidis@gmail.com
File Name: dipy/viz/fvtk.py
Class Name:
Method Name: volume


Project Name: nipy/dipy
Commit Name: 6e2d0c57f5657525b1647d59b65d80058af11025
Time: 2013-08-02
Author: garyfallidis@gmail.com
File Name: dipy/viz/fvtk.py
Class Name:
Method Name: slicer


Project Name: nipy/dipy
Commit Name: 6e2d0c57f5657525b1647d59b65d80058af11025
Time: 2013-08-02
Author: garyfallidis@gmail.com
File Name: dipy/viz/fvtk.py
Class Name:
Method Name: record