Skip to content

Conversation

@judajake
Copy link
Contributor

We have updated the API for VIDTK

@judajake
Copy link
Contributor Author

@RustyBlue @dstoup

@dstoup
Copy link
Contributor

dstoup commented Sep 12, 2020

@mwoehlke-kitware

Copy link
Member

@mwoehlke-kitware mwoehlke-kitware left a 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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants