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

[BUG] vtkExtractVOI sometime work normally #29

Open
wuzhuobin opened this issue Nov 2, 2016 · 4 comments
Open

[BUG] vtkExtractVOI sometime work normally #29

wuzhuobin opened this issue Nov 2, 2016 · 4 comments
Labels

Comments

@wuzhuobin
Copy link
Owner

As the old days, this is a trick bug.
the extracto voi will lead the canvas source behaves strangely.
When extract around extent[2i] - extent[2i +1], the painting of canvas source won't be render.
However, if extract voi happens without changing cursor's bounding, this will work well.
Now the temporary fixation is that "Dont update the cursor boundary."

@wuzhuobin
Copy link
Owner Author

void MyImageViewer::InitializeCursorBoundary()
{
// uncomment the following code will lead the cursor boundary updated normally
// but it will lead to the canvas source behaviour very strange.

//this->GetInputAlgorithm()->Update();
const double* spacing = GetInput()->GetSpacing();
const double* origin = GetInput()->GetOrigin();
const int* extent = GetInput()->GetExtent();
double bound[6];
bound[0] = origin[0] + extent[0] * spacing[0];
bound[1] = origin[0] + extent[1] * spacing[0];
bound[2] = origin[1] + extent[2] * spacing[1];
bound[3] = origin[1] + extent[3] * spacing[1];
bound[4] = origin[2] + extent[4] * spacing[2];
bound[5] = origin[2] + extent[5] * spacing[2];

Cursor3D->SetModelBounds(bound);
Cursor3D->Update();

}

@wuzhuobin wuzhuobin added the bug label Nov 2, 2016
@wuzhuobin
Copy link
Owner Author

somehow, cursor3d will affect the behaviour of canvas source's behaviour
now it is a temporary fixation for canvas source.
now it is suggested to use the internal method of MyImageViewer to extractVOI

@alabamagan
Copy link
Collaborator

Nice so it is solved?

Get Outlook for iOS

On Wed, Nov 2, 2016 at 11:22 AM +0800, "wuzhuobin" [email protected] wrote:

somehow, cursor3d will affect the behaviour of canvas source's behaviour

now it is a temporary fixation for canvas source.

now it is suggested to use the internal method of MyImageViewer to extractVOI


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@wuzhuobin
Copy link
Owner Author

just force not updating cursor bound

wuzhuobin added a commit that referenced this issue Nov 2, 2016
now it is a temporary fixation for canvas source.
now it is suggested to use the internal method of MyImageViewer to extractVOI
related to issue #29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants