-
Notifications
You must be signed in to change notification settings - Fork 15
How we access image objects has changed in vidtk #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mwoehlke-kitware
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Someone's still using VidTK with ViViA?)
| vtkPoints* fromShellPoints, | ||
| vtkIdType fromShellPtsStart) | ||
| { | ||
| vtkDebugMacro("insert next point: " << timeStamp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended?
| vtkDebugMacro("insert next point: " << timeStamp); |
| obj = orig_state->get_image_object(); | ||
| if (obj != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modernize:
| obj = orig_state->get_image_object(); | |
| if (obj != nullptr) | |
| if (auto* const obj = orig_state->get_image_object()) |
...and remove the prior declaration.
| obj = trackState->get_image_object(); | ||
| if (obj != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, please modernize:
| obj = trackState->get_image_object(); | |
| if (obj != nullptr) | |
| if (auto const obj = trackState->get_image_object()) |
...and remove the prior declaration.
(Incidentally, I approve of getting rid of out parameters! Those are awful...)
| vtkPoints* fromShellPts, | ||
| vtkIdType fromShellPtsStart) | ||
| { | ||
| vtkDebugMacro("set point: " << timeStamp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| vtkDebugMacro("set point: " << timeStamp); |
| vidtk::image_object* obj_sptr = vs.get_image_object(); | ||
| if (obj_sptr != nullptr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modernize:
| vidtk::image_object* obj_sptr = vs.get_image_object(); | |
| if (obj_sptr != nullptr) | |
| if (auto* const obj = vs.get_image_object()) |
Also, the variable name is wrong:
- It isn't a smart pointer, so should not be named as if it were.
- This code should use camelCase names, not names_with_underscores. (I'm aware some of this code already isn't following that, but let's not exacerbate the problem.)
We have updated the API for VIDTK