obj.copyobject
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | obj.copyobject [2010/06/12 02:37] (current) – created jochen | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== obj.CopyObject ====== | ||
+ | ===== Motivation ===== | ||
+ | While the object-oriented interface and calling convention for xff objects is suitable in most situations (e.g. a method that alters an object by, for instance, adding a volume-of-interest to a VOI file), there is the occasional need to create a temporary working copy of an object which, once the task is completed, can be discarded. Alternatively, | ||
+ | |||
+ | In both these situations, the '' | ||
+ | |||
+ | ===== Reference (' | ||
+ | < | ||
+ | |||
+ | | ||
+ | |||
+ | No input fields | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Usage example ===== | ||
+ | <code matlab obj_copyobject_example.m> | ||
+ | vmr = xff(' | ||
+ | |||
+ | % create a copy (does NOT YET double the allocated memory!) | ||
+ | smoothed = vmr.CopyObject; | ||
+ | |||
+ | % smooth VMRData | ||
+ | smoothed.VMRData = uint8(floor(smoothdata3(double(vmr.VMRData), | ||
+ | |||
+ | % histogram of differences | ||
+ | hist(vmr.VMRData(vmr.VMRData ~= 0) - smoothed(vmr.VMRData ~= 0), 100);</ | ||
+ | |||
+ | ===== Notes ===== | ||
+ | Just as mentioned in the example above, due to Matlab' |
obj.copyobject.txt · Last modified: 2010/06/12 02:37 by jochen