Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Packages/DV3D/ImagePlaneWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,8 @@ def SetLookupTable( self, table ):

def ConvertPositionToRelative( self, position ):
bounds = self.dataBounds[ self.PlaneOrientation*2:]
rpos = ( position - bounds[0] ) / ( bounds[1] - bounds[0] )
bsize = ( bounds[1] - bounds[0] )
rpos = 0.0 if ( bsize == 0.0 ) else ( position - bounds[0] ) / bsize
return rpos

def ConvertPositionFromRelative( self, relative_position ):
Expand All @@ -1012,7 +1013,7 @@ def SetSlicePositionFromRelative( self, rel_position ):
return position

def SetSlicePosition( self, position ):
print " SetSlicePosition: %s, bounds: %s " % ( str(position), str(self.dataBounds) )
# print " SetSlicePosition: %s, bounds: %s " % ( str(position), str(self.dataBounds) )
self.CurrentPosition = position
planeOrigin = list( self.PlaneSource.GetOrigin() )
planeOrigin[ self.PlaneOrientation ] = position
Expand Down
3 changes: 2 additions & 1 deletion Packages/DV3D/RectilinearGridPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ def processSlicingCommand( self, args, config_function = None ):
if plane_index == 2:
slicePosition.setValue( 'relative', pos )
pos = plane_widget.SetSlicePositionFromRelative( pos )
slicePosition.setValues( [ pos ] )
slicePosition.setValues( [ pos ] )
plane_widget.SetSlicePosition( pos )
state = config_function.getState()
if state <> None:
bbar = self.getPlotButtonbar()
Expand Down
2 changes: 1 addition & 1 deletion testing/dv3d/TestDefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'ScaleColormap': [-10.0, 10.0, 1],
'BasemapOpacity': [0.5],
'XSlider': ( -50.0, vcs.on ),
'ZSlider': ( 10.0, vcs.on ),
'ZSlider': ( 0.0, vcs.on ),
'YSlider': ( 20.0, vcs.on ),
} )

Expand Down
5 changes: 3 additions & 2 deletions testing/dv3d/TestManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def build(self):
plot_args.append( self.gm )

plot_kwargs = { 'cdmsfile': self.file.id, 'window_size': (900,600) }
self.canvas.setantialiasing(False)
self.canvas.plot( *plot_args, **plot_kwargs )
self.plot = self.canvas.backend.plotApps[ self.gm ]
# self.applyActions()
Expand Down Expand Up @@ -153,5 +154,5 @@ def writeCMakeDef( self, f ):
if __name__ == '__main__':
from TestDefinitions import testManager
# testManager.runTests()
# testManager.runTest( 'dv3d_slider_test', True )
testManager.showTest( 'dv3d_constituents_test' )
testManager.runTest( 'dv3d_slider_test', True )
# testManager.showTest( 'dv3d_constituents_test' )
Binary file modified testing/dv3d/images/dv3d_constituents_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified testing/dv3d/images/dv3d_slider_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.