Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Connecting the image slice change with the slider
Forum Updated to NodeBB v4.3 + New Features

Connecting the image slice change with the slider

Scheduled Pinned Locked Moved India
6 Posts 2 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rekhap
    wrote on last edited by
    #1

    hello,
    m really stuck with an issue and m new to qt..
    plz help me out.
    my task is to read the image of x number of slice.. display it,, set slider and spin box so that all three shud interact with each other.
    sinbox- slider
    slider-spinbox
    slider-qvtkwidget these are connected bt when i move the mouse wheel for changing the image slice the slider has to be moved according to the mouse wheel.. m nt understanding how to connect it.

    thanks inadvance

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Can you explain with a simple example what your are trying to do ?
      From the description above it's tough to guess.

      157

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rekhap
        wrote on last edited by
        #3

        i have read sequence of image in a qvtkwidget and connected slider and spinbox to it so that wen i scroll my mouse i shud know the slice number.
        wen i move slider slices move bt i am struggling to connect it in reverse like wen my slices move with the scroll slider shud move bt which is nt happeneing.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rekhap
          wrote on last edited by
          #4

          hey Gene thanku for ua reply.. i solved the problem and its working fine...

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            Good to hear the you solved your problem. You can post the solution here in brief words if possible so that in future someone would benefit from it. Also you can mark the post as solved.

            157

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rekhap
              wrote on last edited by
              #6

              @#include "ui_mainwindow.h"

              and in the interactor style class did as below
              Ui_MainWindow *_ui;

              void SetUi(Ui_MainWindow *ui)
              {
              _ui=ui;
              }

              void OnMouseWheelForward()
              {
              if(_Slice < Max_Slice)
              {
              _Slice += 1;
              Image_Viewer->SetSlice(_Slice);
              _ui->verticalSlider_2->setValue(_Slice);

                   Image_Viewer->Render(); 
                }
              

              }

              and things work perfect.
              @

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved