- changed status to resolved
Errorneous volume cut for dataObjects with ROI
Issue #25
resolved
# coding=iso-8859-15
#add a 3d dataObject
a = dataObject.zeros([200,221,189], 'float32')
#add some blocks to the dataObject
a[100:110,:,:] = 1
a[130:170,100:120,60:90]+=3
#create a deep copy of a roi of a, where the "invisible" values are copied, too and the roi parameters are equal to those of a (Default in itom)
b : dataObject = a[90:180,:,:].copy(0)
#same deep copy, however the invisible part of the ROI is not copied.
c = a[90:180,:,:].copy(1)
plot(a, properties = {"title":"Original: a"})
plot(b, properties = {"title":"ROI deep copy 0 (PROBLEM with volume cut): b"})
plot(c, properties = {"title":"ROI deep copy 1 (no problem): c"})
plot(a[90:180,:,:], properties = {"title":"PROBLEM: direct roi with shallow copy"})
In the code above (see also attachment), different versions of deep and shallow copies are created from a dataObject. If an object with an active ROI is plot using the itom2dqwtplot, the volumeCut tool displayes wrong values.
Comments (1)
-
- Log in to comment
fixes
#25: plane offset wasn't taken into account→ <<cset e709da0cbf77>>