Exemplo n.º 1
0
void medResliceViewer::thickSlabChanged(double val)
{
    QDoubleSpinBox * spinBoxSender = qobject_cast<QDoubleSpinBox*>(QObject::sender());

    if (spinBoxSender)
    {
        double x,y,z;
        riw[2]->GetResliceCursor()->GetThickness(x,y,z);

        if (spinBoxSender->accessibleName()=="SpacingX")
        {
            if (reformaTlbx->findChild<QComboBox*>("bySpacingOrDimension")->currentText() == "Spacing")
            {
                riw[0]->GetResliceCursor()->SetThickness(val,y,z); //the three windows share the same reslice cursor
            }
            outputSpacing[0]=val;
        }

        if (spinBoxSender->accessibleName()=="SpacingY")
        {
            if (reformaTlbx->findChild<QComboBox*>("bySpacingOrDimension")->currentText() == "Spacing")
            {
                riw[0]->GetResliceCursor()->SetThickness(x,val,z); //the three windows share the same reslice cursor
            }
            outputSpacing[1]=val;
        }

        if (spinBoxSender->accessibleName()=="SpacingZ")
        {
            if (reformaTlbx->findChild<QComboBox*>("bySpacingOrDimension")->currentText() == "Spacing")
            {
                riw[0]->GetResliceCursor()->SetThickness(x,y,val); //the three windows share the same reslice cursor
            }
            outputSpacing[2]=val;
        }
        this->render();
    }
}