How we access image objects has changed in vidtk#71
Open
judajake wants to merge 1 commit intoKitware:masterfrom
Open
How we access image objects has changed in vidtk#71judajake wants to merge 1 commit intoKitware:masterfrom
judajake wants to merge 1 commit intoKitware:masterfrom
Conversation
Contributor
Author
Contributor
Member
mwoehlke-kitware
left a comment
There was a problem hiding this comment.
(Someone's still using VidTK with ViViA?)
| vtkPoints* fromShellPoints, | ||
| vtkIdType fromShellPtsStart) | ||
| { | ||
| vtkDebugMacro("insert next point: " << timeStamp); |
Member
There was a problem hiding this comment.
Is this intended?
Suggested change
| vtkDebugMacro("insert next point: " << timeStamp); |
Comment on lines
+641
to
+642
| obj = orig_state->get_image_object(); | ||
| if (obj != nullptr) |
Member
There was a problem hiding this comment.
Please modernize:
Suggested change
| obj = orig_state->get_image_object(); | |
| if (obj != nullptr) | |
| if (auto* const obj = orig_state->get_image_object()) |
...and remove the prior declaration.
Comment on lines
+976
to
+977
| obj = trackState->get_image_object(); | ||
| if (obj != nullptr) |
Member
There was a problem hiding this comment.
Again, please modernize:
Suggested change
| 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); |
Member
There was a problem hiding this comment.
Suggested change
| vtkDebugMacro("set point: " << timeStamp); |
Comment on lines
+21
to
+22
| vidtk::image_object* obj_sptr = vs.get_image_object(); | ||
| if (obj_sptr != nullptr) |
Member
There was a problem hiding this comment.
Please modernize:
Suggested change
| 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.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have updated the API for VIDTK