81b99bfa02345b83b75488a535a9bd85f49d65e6,invesalius/data/imagedata_utils.py,,ResampleMatrix,#,7

Before Change


    size = imagedata.GetDimensions()

    width = float(size[0])
    height = float(size[1]/value)

    resolution = (height/(extent[1]-extent[0])+1)*spacing[1]

    resample = vtk.vtkImageResample()
    resample.SetInput(imagedata)
    resample.SetAxisMagnificationFactor(0, resolution)

After Change


    extent = imagedata.GetExtent()
    spacing = imagedata.GetSpacing()

    if extent[1]==extent[3]:
        f = extent[1]
        x = 0
        y = 1

    elif extent[1]==extent[5]:
        f = extent[1]
        x=0
        y=2

    elif extent[3]==extent[5]:
        f = extent[3]
        x = 1
        y = 2

    factor = xy_dimension/float(f+1)
    
    resample = vtk.vtkImageResample()
    resample.SetInput(imagedata)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: invesalius/invesalius3
Commit Name: 81b99bfa02345b83b75488a535a9bd85f49d65e6
Time: 2009-07-22
Author: paulojamorim@gmail.com
File Name: invesalius/data/imagedata_utils.py
Class Name:
Method Name: ResampleMatrix


Project Name: rasbt/mlxtend
Commit Name: 1ac01c049faee3044894bd3428ac6021b069d516
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/scoring.py
Class Name:
Method Name: scoring


Project Name: rasbt/mlxtend
Commit Name: 1309ae7802aede445fa4bf943eee09422724e8e6
Time: 2016-03-08
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/scoring.py
Class Name:
Method Name: scoring