Closed Sunderlandkyl closed 6 years ago
@lassoan There are a couple of logical differences between the two versions. In ReadXMLAttributes, there is a number of attributes that used to have some bounds checking on them and error/warning messages.
Ex. ModelType, KochanekBias, etc.
How important is this bounds checking? Should I restore it for these specific attributes?
How important is this bounds checking?
It is good to have them. Probably we can implement them by simply replacing vtkSetClampMacro by vtkSetClampMacro.
It would be also nice to handle legacy attribute names - see how it is done in vtkMRMLCameraNode::ReadXMLAttributes.
@Sunderlandkyl I'm ready to merge this if you implement what is discussed above (use vtkSetClampMacro and handle legacy attribute names). Thanks!
vtkSetClampMacro added.
I already had:
vtkMRMLReadXMLEnumMacro(InterpolationType, CurveType);
as well as:
vtkMRMLReadXMLEnumMacro(CurveType, CurveType);
which should handle the InterpolationType legacy attribute name for CurveType.
Are there any other legacy attributes that need to be handled?
Thank you!
Added functionality to Copy and PrintSelf methods. Changed WriteXML and ReadXMLAttributes to use MRML node macros.