I want to apply the cine of series image inside my project?
-
I have a series of image loaded inside the viewport. Now, I want to take a button and when i click the button all the slices of series changing to FPS(frame per second). I dont have enough idea abot how to do this.
I will used this code for move slider infinite time:-connect is used for tranfering the signal when button is pressed.
connect(this->ui->m_cine, SIGNAL(pressed()), this, SLOT(AnimatedSlider()));this Function is the working function infinite loop:-
void QtVTKRenderWindows::AnimatedSlider() { QPropertyAnimation *animation = new QPropertyAnimation(slider, "sliderPosition"); animation->setDuration(1000); animation->setStartValue(slider->minimum()); animation->setEndValue(slider->maximum()); animation->setEasingCurve(QEasingCurve::OutCubic); animation->setLoopCount(-1); animation->start(); }But i am getting problem like when i set the loop count to -1. It will goes to finite time
Any help is considerable
Thank you -
Hi,
One thing that is not good is that you are creating a new animation each time you call AnimatedSlider. You should likely create it once and only update its parameter and start it in AnimatedSlider.
-
Hi,
One thing that is not good is that you are creating a new animation each time you call AnimatedSlider. You should likely create it once and only update its parameter and start it in AnimatedSlider.
-
Hi,
One thing that is not good is that you are creating a new animation each time you call AnimatedSlider. You should likely create it once and only update its parameter and start it in AnimatedSlider.
-
So you should use something like:
animation->setKeyValueAt(0, slider->minimum()); animation->setKeyValueAt(0.5, slider->maximum()); animation->setKeyValueAt(1, slider->minimum());and remove the
setStartValueandsetEndValuecalls. -
So you should use something like:
animation->setKeyValueAt(0, slider->minimum()); animation->setKeyValueAt(0.5, slider->maximum()); animation->setKeyValueAt(1, slider->minimum());and remove the
setStartValueandsetEndValuecalls. -
I don't understand that statement. Can you rephrase it or show an example of what is happening ?
-
I don't understand that statement. Can you rephrase it or show an example of what is happening ?
@SGaist On button click slider move like cine play . but every slice of image not show .Like it will skip slice of image .
I am taking the trigger signal when the moveconnect(sliter, SIGNAL(valueChanged(int)), SLOT(slider_Event(int)));And i am invoking the signal here.when the slider is move from one slice to another slice.
void QtVTKRenderWindows::slider_Event(int index) { int pos =slider->sliderPosition(); RadSpaViewer->m_VtkImageSlicing(pos, 2); }this function is work for displaying the next slice
m_VtkImageSlicing(sliderposition,sliderNumber) -
Is the slider max value accurate ?
-
What are these values ?
-
Did you set the singleStep to 1 ?
Also, did you check the value you receiving in that slot ?