Skip to content
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

Fix: wrong position and scale of context items when resizing ImageViewer (vtk6) #1081

Closed
wants to merge 1 commit into from

Conversation

mdkus
Copy link
Contributor

@mdkus mdkus commented Jan 12, 2015

#1049 ...I think the only way to get the same resize behaviour than with 'vtkImageSlice', is to derive a new class of the context items context actor, which is drawing them, und to override its drawing function. After some testing I can say that this emulation function ('RenderOverlay') leads to precise results:

Before patch:
imageviewer - vtk6 2 - before patch

After patch:
imageviewer - vtk6 2 - after patch

@mdkus
Copy link
Contributor Author

mdkus commented Jan 29, 2015

@taketwo Sergey?

@taketwo
Copy link
Member

taketwo commented Jan 29, 2015

Maybe we could factor out this version-dependent code into a separate class? For example, it could be PCLContextActor and go into "visualization/vtk" folder. For the old vtk version it would be simply a typedef, and for the new one your proposed class. Then we will avoid adding new #ifdefs in the viewer code. I know it is stuffed with conditional compilations already, but why adding more? What do you think?

@mdkus
Copy link
Contributor Author

mdkus commented Jan 31, 2015

Yes, I agree. I'll prepare a new pull request.

@mdkus mdkus closed this Jan 31, 2015
@taketwo
Copy link
Member

taketwo commented Jan 31, 2015

Thanks!

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.

2 participants