From: Romulo Pinho Date: Tue, 7 Jun 2011 08:04:11 +0000 (+0200) Subject: Merge branch 'master' into blutdirmaster X-Git-Tag: v1.3.0~330 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d83d2456795de427652e79600aff8aac47511a7e;hp=1c36198476c52684f55d4b6e4d30241d3a4c2e68;p=clitk.git Merge branch 'master' into blutdirmaster --- diff --git a/itk/clitkBackProjectImageFilter.h b/itk/clitkBackProjectImageFilter.h index ebaeffc..7de71a1 100644 --- a/itk/clitkBackProjectImageFilter.h +++ b/itk/clitkBackProjectImageFilter.h @@ -148,6 +148,11 @@ namespace clitk } } + void SetPanelShift(double x, double y) + { + m_PanelShift[0] = x; + m_PanelShift[1] = y; + } // itkSetMacro(IsoCenter, OutputPointType); // itkGetConstReferenceMacro(IsoCenter, OutputPointType) // itkSetMacro( SourceToScreen, double ); @@ -258,6 +263,7 @@ namespace clitk double m_SourceToAxis; OutputPixelType m_EdgePaddingValue; double m_ProjectionAngle; + double m_PanelShift[2]; // Output image info OutputSizeType m_OutputSize; // Size of the output image diff --git a/itk/clitkBackProjectImageFilter.txx b/itk/clitkBackProjectImageFilter.txx index 65ac801..befc882 100644 --- a/itk/clitkBackProjectImageFilter.txx +++ b/itk/clitkBackProjectImageFilter.txx @@ -20,6 +20,7 @@ #include "clitkBackProjectImageFilter.h" #include "itkContinuousIndex.h" #include "vnl/vnl_math.h" +#include "itkLinearInterpolateImageFunction.h" namespace clitk { @@ -39,6 +40,8 @@ namespace clitk this->m_SourceToAxis = 1000.0; this->m_EdgePaddingValue = itk::NumericTraits::Zero;//density images this->m_RigidTransformMatrix.SetIdentity(); + this->m_PanelShift[0] = 0.; + this->m_PanelShift[1] = 0.; //Parameters for output this->m_OutputSpacing.Fill(1); @@ -304,8 +307,6 @@ namespace clitk { //Projection pointer InputImageConstPointer inputPtr=this->GetInput(); - InputPixelType * beginPtr=const_cast(this->GetInput()->GetBufferPointer()); - InputPixelType * pp; //Volume pointer OutputImagePointer outputPTr= this->GetOutput(); @@ -325,8 +326,6 @@ namespace clitk OutputIndexType oIndex; ContinuousInputIndexType iIndex; InputSizeType inputSize=inputPtr->GetLargestPossibleRegion().GetSize(); - double dx,dy,dxm,dym; - int lx, ly; //Get the first output coordinate oIndex=iterator.GetIndex();//costly but only once a thread @@ -337,9 +336,13 @@ namespace clitk //Compute the first input coordinate (invert Y/X) homInputPoint= (m_ProjectionMatrix * homOutputPoint); - iPoint[0]=-homInputPoint[0]/homInputPoint[2]; - iPoint[1]=homInputPoint[1]/homInputPoint[2]; - + iPoint[0]=-homInputPoint[0]/homInputPoint[2] + m_PanelShift[0]; + iPoint[1]=homInputPoint[1]/homInputPoint[2] + m_PanelShift[1]; + + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); + interpolator->SetInputImage(this->GetInput()); + //Run over all output voxels for (unsigned int i=0; iTransformPhysicalPointToContinuousIndex(iPoint, iIndex) ) - { - //Own (fast bilinear) interpolation - lx = (int)floor(iIndex[0]); dx = iIndex[0]-lx; dxm = 1.-dx; - ly = (int)floor(iIndex[1]); dy = iIndex[1]-ly; dym = 1.-dy; - pp = beginPtr + ly*inputSize[0]+lx; - value =static_cast( ( dxm * dym*(double)(*pp) - + dx * dym*(double)(*(pp+1)) - + dxm* dy *(double)(*(pp + inputSize[0])) - + dx * dy *(double)(*(pp + inputSize[0]+1))) ); - - } + if (m_ModifiedInput->TransformPhysicalPointToContinuousIndex(iPoint, iIndex) && interpolator->IsInsideBuffer(iIndex)) + value = interpolator->EvaluateAtContinuousIndex(iIndex); //Outside: padding value - else value=m_EdgePaddingValue; - + else + value=m_EdgePaddingValue; //Set it iterator.Set(value); diff --git a/tools/clitkConeBeamProjectImage.ggo b/tools/clitkConeBeamProjectImage.ggo index 1c77551..4e80707 100644 --- a/tools/clitkConeBeamProjectImage.ggo +++ b/tools/clitkConeBeamProjectImage.ggo @@ -35,4 +35,4 @@ option "size" - "Size for the output image" int multiple no default="512" option "spacing" - "Spacing for the output image" double multiple no default="0.8" option "panel_position" - "Approximate position of the panel: small, medium or large" string no default="small" -option "panel_shift" - "Precise position of the panel in mm" double no +option "panel_shift" - "Precise position of the panel in mm" double multiple no diff --git a/tools/clitkConeBeamProjectImageFilter.h b/tools/clitkConeBeamProjectImageFilter.h index fcf8610..2363a5f 100644 --- a/tools/clitkConeBeamProjectImageFilter.h +++ b/tools/clitkConeBeamProjectImageFilter.h @@ -188,11 +188,16 @@ namespace clitk } /** Set the panelshift. */ - void SetPanelShift(double shift) + void SetPanelShift(double x, double y) { - if (m_PanelShift!=shift) + if (m_PanelShift[0] != x) { - m_PanelShift=shift; + m_PanelShift[0] = x; + m_IsInitialized=false; + } + if (m_PanelShift[1] != y) + { + m_PanelShift[1] = y; m_IsInitialized=false; } } @@ -229,7 +234,7 @@ namespace clitk double m_SourceToScreen; double m_SourceToAxis; double m_ProjectionAngle; - double m_PanelShift; + double m_PanelShift[2]; MatrixType m_RigidTransformMatrix; OutputPixelType m_EdgePaddingValue; diff --git a/tools/clitkConeBeamProjectImageFilter.txx b/tools/clitkConeBeamProjectImageFilter.txx index dfc8898..798fbd1 100644 --- a/tools/clitkConeBeamProjectImageFilter.txx +++ b/tools/clitkConeBeamProjectImageFilter.txx @@ -36,6 +36,8 @@ namespace clitk m_IsoCenter.Fill(0.0); m_SourceToScreen=1536.; m_SourceToAxis=1000.; + m_PanelShift[0] = 0.; + m_PanelShift[1] = 0.; m_ProjectionAngle=0.; m_RigidTransformMatrix.SetIdentity(); m_EdgePaddingValue=itk::NumericTraits::Zero;//density images @@ -163,15 +165,15 @@ namespace clitk spacingOutput[1] = m_OutputSpacing[0]; // pixel spacing along Y of the 2D DRR image [mm] spacingOutput[2] = m_OutputSpacing[1]; // pixel spacing along Y of the 2D DRR image [mm] m_Resampler->SetOutputSpacing( spacingOutput ); - if (m_Verbose)std::cout<<"The output size is "<< m_OutputSpacing <<"..."<< std::endl; + if (m_Verbose)std::cout<<"The output spacing is "<< m_OutputSpacing <<"..."<< std::endl; // The position of the DRR is specified, we presume that for an angle of 0° the flatpanel is located at the negative x-axis // JV -1 seems to correspond better with shearwarp of Simon Rit typename InterpolatorType::InputPointType originOutput; originOutput[0] = m_IsoCenter[0]- (m_SourceToScreen - m_SourceToAxis); DD(m_PanelShift); - originOutput[1] = m_IsoCenter[1]-static_cast(sizeOuput[1]-1)*spacingOutput[1]/2.0 - m_PanelShift; - originOutput[2] = m_IsoCenter[2]-static_cast(sizeOuput[2]-1)*spacingOutput[2]/2.0; + originOutput[1] = m_IsoCenter[1]-static_cast(sizeOuput[1]-1)*spacingOutput[1]/2.0 - m_PanelShift[0]; + originOutput[2] = m_IsoCenter[2]-static_cast(sizeOuput[2]-1)*spacingOutput[2]/2.0 - m_PanelShift[1]; m_Resampler->SetOutputOrigin( originOutput ); if (m_Verbose)std::cout<<"The origin of the flat panel is at "<< originOutput <<",..."<< std::endl; diff --git a/tools/clitkConeBeamProjectImageGenericFilter.cxx b/tools/clitkConeBeamProjectImageGenericFilter.cxx index d659b96..e36b7d1 100644 --- a/tools/clitkConeBeamProjectImageGenericFilter.cxx +++ b/tools/clitkConeBeamProjectImageGenericFilter.cxx @@ -133,14 +133,14 @@ namespace clitk DD(m_ArgsInfo.panel_position_arg); if (m_ArgsInfo.panel_shift_given) // one should read the specific values for each angle in Frame.dbf - filter->SetPanelShift(m_ArgsInfo.panel_shift_arg); + filter->SetPanelShift(m_ArgsInfo.panel_shift_arg[0], m_ArgsInfo.panel_shift_arg[1]); else { // approximate panel positions hard coded values for the elekta synergy if (strcmp(m_ArgsInfo.panel_position_arg,"small") ==0) - filter->SetPanelShift(0.); + filter->SetPanelShift(0., 0.); else if (strcmp(m_ArgsInfo.panel_position_arg,"medium") ==0) - filter->SetPanelShift(114.84); + filter->SetPanelShift(114.84, 0.); // VD : 120 , 0 ? else if (strcmp(m_ArgsInfo.panel_position_arg,"large") ==0) - filter->SetPanelShift(190.); + filter->SetPanelShift(190., 0.); else assert(false); //Unsupported panel position } // Output image info diff --git a/vv/qt_ui/vvHelpDialog.ui b/vv/qt_ui/vvHelpDialog.ui index 303a665..2917b13 100644 --- a/vv/qt_ui/vvHelpDialog.ui +++ b/vv/qt_ui/vvHelpDialog.ui @@ -65,7 +65,7 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">space</span><span style=" font-size:12pt;">: Landmark</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600; text-decoration: underline;">Navigation</span></p> @@ -74,6 +74,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">u</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">U</span><span style=" font-size:12pt;">pdate Image</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">f</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">F</span><span style=" font-size:12pt;">ly To Mouse Position</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">g</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">G</span><span style=" font-size:12pt;">o to Crosshair Position</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">o</span><span style=" font-size:12pt;">: Go to Image </span><span style=" font-size:12pt; text-decoration: underline;">O</span><span style=" font-size:12pt;">rigin</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">h</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">H</span><span style=" font-size:12pt;">ide Crosshair and corner annotations</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Up,Down</span><span style=" font-size:12pt;">: Change Slice</span></p> diff --git a/vv/qt_ui/vvOverlayPanel.ui b/vv/qt_ui/vvOverlayPanel.ui index 60a6803..af07fe8 100644 --- a/vv/qt_ui/vvOverlayPanel.ui +++ b/vv/qt_ui/vvOverlayPanel.ui @@ -6,8 +6,8 @@ 0 0 - 323 - 447 + 342 + 480 @@ -171,12 +171,12 @@ p, li { white-space: pre-wrap; } - - + + background-color: rgb(0, 255, 0); border: 0px; - + @@ -330,13 +330,7 @@ p, li { white-space: pre-wrap; } QFrame::Raised - - - 2 - - - 2 - + @@ -353,7 +347,7 @@ p, li { white-space: pre-wrap; } - + @@ -366,14 +360,14 @@ p, li { white-space: pre-wrap; } - + - Opacity : + Global Opacity : - + @@ -386,7 +380,36 @@ p, li { white-space: pre-wrap; } - + + + + All colors below the threshold will be made transparent. + + + + + + + + + Transparency Threshold : + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + @@ -399,10 +422,10 @@ p, li { white-space: pre-wrap; } - + - 3 + 0 @@ -419,6 +442,11 @@ p, li { white-space: pre-wrap; } Cold + + + Dosimetry + + Full Color Range @@ -426,14 +454,14 @@ p, li { white-space: pre-wrap; } - + Window : - + 4 @@ -452,14 +480,14 @@ p, li { white-space: pre-wrap; } - + Level : - + 4 @@ -478,7 +506,7 @@ p, li { white-space: pre-wrap; } - + diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 8a0bd24..c60c04d 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -290,8 +290,8 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() connect(linkPanel,SIGNAL(removeLink(QString,QString)),this,SLOT(RemoveLink(QString,QString))); connect(overlayPanel,SIGNAL(VFPropertyUpdated(int,int,int,int,double,double,double)),this,SLOT(SetVFProperty(int,int,int,int,double,double,double))); connect(overlayPanel,SIGNAL(OverlayPropertyUpdated(int)),this,SLOT(SetOverlayProperty(int))); - connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,double,double)), - this,SLOT(SetFusionProperty(int,int,double,double))); + connect(overlayPanel,SIGNAL(FusionPropertyUpdated(int,int,int,double,double)), + this,SLOT(SetFusionProperty(int,int,int,double,double))); connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows())); playMode = 0;//pause @@ -865,6 +865,7 @@ void vvMainWindow::LoadImages(std::vector files, vvImageReader::Loa item->setData(0,Qt::UserRole,files[i].c_str()); QFileInfo fileinfo(imageManager->GetFileName().c_str()); //Do not show the path item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName()); + item->setData(1,Qt::UserRole,tr("image")); item->setToolTip(COLUMN_IMAGE_NAME, imageManager->GetListOfAbsoluteFilePathInOneString("image").c_str()); qApp->processEvents(); @@ -1167,12 +1168,13 @@ void vvMainWindow::ImageInfoChanged() if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) { overlayPanel->getFusionName(mSlicerManagers[index]->GetFusionName().c_str()); overlayPanel->getFusionProperty(mSlicerManagers[index]->GetFusionOpacity(), + mSlicerManagers[index]->GetFusionThresholdOpacity(), mSlicerManagers[index]->GetFusionColorMap(), mSlicerManagers[index]->GetFusionWindow(), mSlicerManagers[index]->GetFusionLevel()); } else { overlayPanel->getFusionName(mSlicerManagers[index]->GetFusionName().c_str()); - overlayPanel->getFusionProperty(-1, -1,-1,-1); + overlayPanel->getFusionProperty(-1, -1, -1, -1, -1); } } } @@ -1340,75 +1342,71 @@ QTreeWidgetItem* vvMainWindow::GetItemFromSlicerManager(vvSlicerManager* sm) //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -void vvMainWindow::DisplayChanged(QTreeWidgetItem *clicked_item, int column) +void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column) { - int index = GetSlicerIndexFromItem(clicked_item); if ( column >= COLUMN_CLOSE_IMAGE || column <= 0) return; + + // Get parent information (might be the same item) + int slicerManagerIndex = GetSlicerIndexFromItem(clickedItem); + QTreeWidgetItem* clickedParentItem = DataTree->topLevelItem(slicerManagerIndex); + vvSlicer* clickedSlicer = mSlicerManagers[slicerManagerIndex]->GetSlicer(column-1); + + // Go over the complete item tree (only 2 levels, parents and children) for (unsigned int i = 0; i < mSlicerManagers.size(); i++) { - //Trick to avoid redoing twice the job for a key (sr) - mSlicerManagers[i]->GetSlicer(column-1)->GetRenderWindow()-> GetInteractor()->SetKeySym("Crap"); - - QTreeWidgetItem* current_row=DataTree->topLevelItem(i); - if (DataTree->topLevelItem(index) == current_row) { - vvSlicer* clicked_slicer=mSlicerManagers[i]->GetSlicer(column-1); - if (current_row == clicked_item) { - //If we just activated a slicer - if (current_row->data(column,Qt::CheckStateRole).toInt() > 0) { - mSlicerManagers[i]->UpdateSlicer(column-1,clicked_item->data(column,Qt::CheckStateRole).toInt()); - mSlicerManagers[i]->UpdateInfoOnCursorPosition(column-1); - DisplaySliders(i,column-1); - std::map overlay_counts; - for (int child = 0; child < current_row->childCount(); child++) { - std::string overlay_type = - current_row->child(child)->data(1,Qt::UserRole).toString().toStdString(); - overlay_counts[overlay_type]++; - current_row->child(child)->setData(column,Qt::CheckStateRole, - current_row->data(column,Qt::CheckStateRole)); - clicked_slicer->SetActorVisibility(overlay_type,overlay_counts[overlay_type]-1,true); - } - } else { //We don't allow simply desactivating a slicer - clicked_item->setData(column,Qt::CheckStateRole,2); - DisplayChanged(clicked_item, column); - return; - } + // Trick to avoid redoing twice the job for a key (sr) + mSlicerManagers[i]->GetSlicer(column-1)->GetRenderWindow()->GetInteractor()->SetKeySym("Crap"); + + QTreeWidgetItem* currentParentItem = DataTree->topLevelItem(i); + if(currentParentItem != clickedParentItem) { + // Not the branch of the clicked item, uncheck all + + // Parent + currentParentItem->setData(column,Qt::CheckStateRole, 0); + mSlicerManagers[i]->UpdateSlicer(column-1, false); + + // Children + for (int iChild = 0; iChild < currentParentItem->childCount(); iChild++) { + currentParentItem->child(iChild)->setData(column,Qt::CheckStateRole, 0); } - //if we clicked on the vector(or overlay) and not the image - else { - if (clicked_item->data(column,Qt::CheckStateRole).toInt()) { - current_row->setData(column,Qt::CheckStateRole,2); - mSlicerManagers[i]->UpdateSlicer(column-1,2); - mSlicerManagers[i]->UpdateInfoOnCursorPosition(column-1); - DisplaySliders(i,column-1); - } - int vis = clicked_item->data(column,Qt::CheckStateRole).toInt(); - std::string overlay_type = clicked_item->data(1,Qt::UserRole).toString().toStdString(); - int overlay_index=0; - for (int child = 0; child < current_row->childCount(); child++) { - if (current_row->child(child)->data(1,Qt::UserRole).toString().toStdString() == overlay_type) - overlay_index++; - if (current_row->child(child) == clicked_item) break; - } - clicked_slicer->SetActorVisibility( - clicked_item->data(1,Qt::UserRole).toString().toStdString(), overlay_index-1,vis); + } + else { + // Branch of the clicked one: get check status from actor visibility in slicer + // and toggle the clicked one + + // Parent + bool vis = clickedSlicer->GetActorVisibility("image", 0); + bool draw = clickedSlicer->GetRenderer()->GetDraw(); + + // Update slicer (after getting visibility) + mSlicerManagers[slicerManagerIndex]->UpdateSlicer(column-1, true); + mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1); + DisplaySliders(slicerManagerIndex, column-1); + if(clickedParentItem == clickedItem) { + // Toggle + vis = !draw || !vis; } - } else if (current_row->data(column,Qt::CheckStateRole).toInt() > 0) { - current_row->setData(column,Qt::CheckStateRole,0); - mSlicerManagers[i]->UpdateSlicer(column-1,0); - std::map overlay_counts; - for (int child = 0; child < current_row->childCount(); child++) { - std::string overlay_type = - current_row->child(child)->data(1,Qt::UserRole).toString().toStdString(); - overlay_counts[overlay_type]++; - current_row->child(child)->setData(column,Qt::CheckStateRole,0); - vvSlicer * current_slicer=mSlicerManagers[i]->GetSlicer(column-1); - current_slicer->SetActorVisibility(overlay_type,overlay_counts[overlay_type]-1,false); + clickedSlicer->SetActorVisibility("image", 0, vis); + clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0); + + // Children + std::map actorTypeCounts; + for (int iChild = 0; iChild < clickedParentItem->childCount(); iChild++) { + QTreeWidgetItem* currentChildItem = clickedParentItem->child(iChild); + std::string actorType = currentChildItem->data(1,Qt::UserRole).toString().toStdString(); + vis = clickedSlicer->GetActorVisibility(actorType, actorTypeCounts[actorType]); + if(currentChildItem == clickedItem) { + // Toggle or force visibility if it was not on this branch so far + vis = !draw || !vis; + clickedSlicer->SetActorVisibility(actorType, actorTypeCounts[actorType], vis); + } + currentChildItem->setData(column, Qt::CheckStateRole, vis?2:0); + actorTypeCounts[actorType]++; } } - //mSlicerManagers[i]->SetColorMap(-1); - mSlicerManagers[i]->SetColorMap(); } - mSlicerManagers[index]->GetSlicer(column-1)->Render(); + + clickedSlicer->Render(); } //------------------------------------------------------------------------------ @@ -1821,8 +1819,6 @@ void vvMainWindow::AddOverlayImage(int index, QString file) for (int j = 1; j <= 4; j++) { item->setData(j,Qt::CheckStateRole,DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole)); - mSlicerManagers[index]->GetSlicer(j-1)->SetActorVisibility("overlay",0, - DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole).toInt()); } //Create the buttons for reload and close @@ -1943,8 +1939,6 @@ void vvMainWindow::AddFusionImage(int index, QString file) for (int j = 1; j <= 4; j++) { item->setData(j,Qt::CheckStateRole,DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole)); - mSlicerManagers[index]->GetSlicer(j-1)->SetActorVisibility("fusion",0, - DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole).toInt()); } //Create the buttons for reload and close @@ -2028,8 +2022,6 @@ void vvMainWindow::AddFieldEntry(QString filename,int index,bool from_disk) for (int j = 1; j <= 4; j++) { item->setData(j,Qt::CheckStateRole,DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole)); - mSlicerManagers[index]->GetSlicer(j-1)->SetActorVisibility("vector",0, - DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole).toInt()); } //Create the buttons for reload and close @@ -2149,11 +2141,12 @@ void vvMainWindow::SetOverlayProperty(int color) //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -void vvMainWindow::SetFusionProperty(int opacity, int colormap,double window, double level) +void vvMainWindow::SetFusionProperty(int opacity, int thresOpacity, int colormap,double window, double level) { int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]); if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) { mSlicerManagers[index]->SetFusionOpacity(opacity); + mSlicerManagers[index]->SetFusionThresholdOpacity(thresOpacity); mSlicerManagers[index]->SetFusionColorMap(colormap); mSlicerManagers[index]->SetFusionWindow(window); mSlicerManagers[index]->SetFusionLevel(level); @@ -2790,6 +2783,7 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen //create an item in the tree with good settings QTreeWidgetItem *item = new QTreeWidgetItem(); item->setData(0,Qt::UserRole,slicer_manager->GetFileName().c_str());//files[i].c_str()); + item->setData(1,Qt::UserRole,tr("image")); item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,slicer_manager->GetFileName().c_str());//filename.c_str()); qApp->processEvents(); diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 35a5d90..d47dacc 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -143,7 +143,7 @@ public slots: void SetVFProperty(int subsampling,int scale,int lut, int width, double r, double g, double b); void SetOverlayProperty(int color); - void SetFusionProperty(int opacity,int colormap,double window,double level); + void SetFusionProperty(int opacity, int tresOpacity, int colormap,double window,double level); void GoToCursor(); void PlayPause(); diff --git a/vv/vvOverlayPanel.cxx b/vv/vvOverlayPanel.cxx index 843e46d..f19e13b 100644 --- a/vv/vvOverlayPanel.cxx +++ b/vv/vvOverlayPanel.cxx @@ -45,6 +45,7 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent) connect(vfColorButton,SIGNAL(clicked()),this,SLOT(VFColorChangeRequest())); connect(colorHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(setOverlayProperty())); connect(opacityHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(setFusionProperty())); + connect(thresOpacityHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(setFusionProperty())); connect(fusionColorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(setFusionProperty())); connect(windowSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty())); connect(levelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty())); @@ -163,13 +164,15 @@ void vvOverlayPanel::getFusionName(QString name) dataFusionnedLabel->setText(filename.toStdString().c_str()); } -void vvOverlayPanel::getFusionProperty(int opacity, int colormap, double window, double level) +void vvOverlayPanel::getFusionProperty(int opacity, int thresOpacity, int colormap, double window, double level) { if (opacity > -1) { fusionFrame->show(); fusionFrame->setEnabled(1); opacityHorizontalSlider->setEnabled(1); opacityHorizontalSlider->setValue(opacity); + thresOpacityHorizontalSlider->setEnabled(1); + thresOpacityHorizontalSlider->setValue(thresOpacity); fusionColorMapComboBox->setEnabled(1); fusionColorMapComboBox->setCurrentIndex(colormap); windowSpinBox->setEnabled(1); @@ -181,6 +184,8 @@ void vvOverlayPanel::getFusionProperty(int opacity, int colormap, double window, fusionFrame->setEnabled(0); opacityHorizontalSlider->setEnabled(0); opacityHorizontalSlider->setValue(0); + thresOpacityHorizontalSlider->setEnabled(0); + thresOpacityHorizontalSlider->setValue(0); fusionColorMapComboBox->setEnabled(0); fusionColorMapComboBox->setCurrentIndex(-1); windowSpinBox->setEnabled(0); @@ -190,7 +195,7 @@ void vvOverlayPanel::getFusionProperty(int opacity, int colormap, double window, void vvOverlayPanel::setFusionProperty() { - emit FusionPropertyUpdated(opacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(), + emit FusionPropertyUpdated(opacityHorizontalSlider->value(), thresOpacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(), windowSpinBox->value(), levelSpinBox->value()); } diff --git a/vv/vvOverlayPanel.h b/vv/vvOverlayPanel.h index 0b867bc..ef0dcf1 100644 --- a/vv/vvOverlayPanel.h +++ b/vv/vvOverlayPanel.h @@ -41,7 +41,7 @@ public: void getOverlayProperty(int color); void getOverlayName(QString name); - void getFusionProperty(int opacity, int colormap, double window, double level); + void getFusionProperty(int opacity, int thresOpacity, int colormap, double window, double level); void getFusionName(QString name); void getCurrentVectorInfo(int visibility, double x, double y, double z, double value); @@ -57,7 +57,7 @@ public slots: signals: void VFPropertyUpdated(int subsampling, int scale, int log, int width, double r, double g, double b); void OverlayPropertyUpdated(int color); - void FusionPropertyUpdated(int opacity, int colormap, double window, double level); + void FusionPropertyUpdated(int opacity, int thresOpacity, int colormap, double window, double level); }; // end class vvOverlayPanel //==================================================================== diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index c9d9be2..4358357 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -172,7 +172,7 @@ vvBlendImageActor* vvSlicer::GetOverlayActor() //------------------------------------------------------------------------------ -vtkImageMapToWindowLevelColors* vvSlicer::GetFusionMapper() +vtkImageMapToColors* vvSlicer::GetFusionMapper() { return mFusionMapper.GetPointer(); } @@ -372,7 +372,7 @@ void vvSlicer::SetOverlay(vvImage::Pointer overlay) mOverlayActor = vtkSmartPointer::New(); mOverlayActor->SetInput(mOverlayMapper->GetOutput()); mOverlayActor->SetPickable(0); - mOverlayActor->SetVisibility(false); + mOverlayActor->SetVisibility(true); mOverlayActor->SetOpacity(0.5); } @@ -408,14 +408,21 @@ void vvSlicer::SetFusion(vvImage::Pointer fusion) mFusionReslice->SetInput(0, mFusion->GetFirstVTKImageData()); if (!mFusionMapper) - mFusionMapper = vtkSmartPointer::New(); + mFusionMapper = vtkSmartPointer::New(); + + vtkSmartPointer lut = vtkLookupTable::New(); + lut->SetRange(0, 1); + lut->SetValueRange(0, 1); + lut->SetSaturationRange(0, 0); + lut->Build(); + mFusionMapper->SetLookupTable(lut); mFusionMapper->SetInput(mFusionReslice->GetOutput()); if (!mFusionActor) { mFusionActor = vtkSmartPointer::New(); mFusionActor->SetInput(mFusionMapper->GetOutput()); mFusionActor->SetPickable(0); - mFusionActor->SetVisibility(false); + mFusionActor->SetVisibility(true); mFusionActor->SetOpacity(0.7); this->GetRenderer()->AddActor(mFusionActor); } @@ -428,25 +435,50 @@ void vvSlicer::SetFusion(vvImage::Pointer fusion) //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +bool vvSlicer::GetActorVisibility(const std::string& actor_type, int overlay_index) +{ + bool vis = false; + if (actor_type == "image") { + vis = this->ImageActor->GetVisibility(); + } + else if (actor_type == "vector") { + vis = this->mVFActor->GetVisibility(); + } + else if (actor_type == "overlay") { + vis = this->mOverlayActor->GetVisibility(); + } + else if (actor_type == "fusion") { + vis = this->mFusionActor->GetVisibility(); + } + else if (actor_type == "contour") + vis = this->mSurfaceCutActors[overlay_index]->GetActor()->GetVisibility(); + + return vis; +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvSlicer::SetActorVisibility(const std::string& actor_type, int overlay_index ,bool vis) { - if (actor_type == "vector") { + if (actor_type == "image") { + this->ImageActor->SetVisibility(vis); + } + else if (actor_type == "vector") { this->mVFActor->SetVisibility(vis); } - if (actor_type == "overlay") { + else if (actor_type == "overlay") { this->mOverlayActor->SetVisibility(vis); } - if (actor_type == "fusion") { + else if (actor_type == "fusion") { this->mFusionActor->SetVisibility(vis); } - if (actor_type == "contour") + else if (actor_type == "contour") this->mSurfaceCutActors[overlay_index]->GetActor()->SetVisibility(vis); UpdateDisplayExtent(); } //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ void vvSlicer::SetVF(vvImage::Pointer vf) { @@ -1027,12 +1059,7 @@ void vvSlicer::ResetCamera() //---------------------------------------------------------------------------- void vvSlicer::SetDisplayMode(bool i) { - this->GetImageActor()->SetVisibility(i); - this->GetAnnotation()->SetVisibility(i); this->GetRenderer()->SetDraw(i); - if (mLandActor) - mLandActor->SetVisibility(i); - pdmA->SetVisibility(i); if (i) UpdateDisplayExtent(); } @@ -1216,7 +1243,9 @@ void vvSlicer::Render() int ix, iy, iz; double value = this->GetScalarComponentAsDouble(this->GetInput(), X, Y, Z, ix, iy, iz); - worldPos << "data value : " << value << std::endl; + if(ImageActor->GetVisibility()) + worldPos << "data value : " << value << std::endl; + worldPos << "mm : " << lrint(mCurrent[0]) << ' ' << lrint(mCurrent[1]) << ' ' << lrint(mCurrent[2]) << ' ' @@ -1276,13 +1305,11 @@ void vvSlicer::Render() //---------------------------------------------------------------------------- void vvSlicer::UpdateCursorPosition() { - if (this->GetImageActor()->GetVisibility()) { - pdmA->SetVisibility(true); - mCursor[0] = mCurrent[0]; - mCursor[1] = mCurrent[1]; - mCursor[2] = mCurrent[2]; - mCursor[3] = mCurrentTSlice; - } + pdmA->SetVisibility(true); + mCursor[0] = mCurrent[0]; + mCursor[1] = mCurrent[1]; + mCursor[2] = mCurrent[2]; + mCursor[3] = mCurrentTSlice; } //---------------------------------------------------------------------------- diff --git a/vv/vvSlicer.h b/vv/vvSlicer.h index 95ec75e..0536bc1 100644 --- a/vv/vvSlicer.h +++ b/vv/vvSlicer.h @@ -28,6 +28,7 @@ #include #include #include +#include class vtkActor; class vtkActor2D; @@ -70,7 +71,7 @@ public: } vtkImageMapToWindowLevelColors* GetOverlayMapper(); vvBlendImageActor* GetOverlayActor() ; - vtkImageMapToWindowLevelColors* GetFusionMapper() ; + vtkImageMapToColors* GetFusionMapper() ; vtkImageActor* GetFusionActor() ; vtkActor* GetVFActor() ; vtkCornerAnnotation* GetAnnotation(); @@ -80,9 +81,10 @@ public: return mFusion; } - /**Set an actor's visibility ("overlay, fusion, vf, contour...") + /**Get/Set an actor's visibility ("overlay, fusion, vf, contour...") Overlay index is the index of the overlay by type, eg. if there are 5 contours and we want to activate the 3rd one, pass 2 **/ + bool GetActorVisibility(const std::string& actor_type, int overlay_index); void SetActorVisibility(const std::string& actor_type, int overlay_index,bool vis); void RemoveActor(const std::string& actor_type, int overlay_index); @@ -200,7 +202,7 @@ protected: vtkSmartPointer mOverlayMapper; vtkSmartPointer mOverlayActor; vtkSmartPointer mFusionReslice; - vtkSmartPointer mFusionMapper; + vtkSmartPointer mFusionMapper; vtkSmartPointer mFusionActor; vtkSmartPointer ca; vtkSmartPointer crossCursor; diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 7bf8ed6..871c818 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -58,6 +58,7 @@ vvSlicerManager::vvSlicerManager(int numberOfSlicers) mOverlayColor = 130; mFusionOpacity = 70; + mFusionThresOpacity = 1; mFusionColorMap = 3; mFusionWindow = 1000; mFusionLevel = 1000; @@ -292,6 +293,7 @@ bool vvSlicerManager::SetFusion(std::string filename,int dim, std::string compon double *fusRange = mFusionReader->GetOutput()->GetVTKImages()[0]->GetScalarRange(); mFusionLevel = (fusRange[0]+fusRange[1])/2; mFusionWindow = fusRange[1]-fusRange[0]; + return true; } //---------------------------------------------------------------------------- @@ -431,7 +433,6 @@ void vvSlicerManager::SetTSlice(int slice) for ( unsigned int i = 0; i < mSlicers.size(); i++) { if (slice != mSlicers[i]->GetTSlice()) { mSlicers[i]->SetTSlice(slice); - if (mSlicers[i]->GetImageActor()->GetVisibility()) UpdateTSlice(i); } } @@ -493,8 +494,7 @@ void vvSlicerManager::SetTSliceInSlicer(int tslice, int slicer) if (mSlicers[slicer]->GetTSlice() == tslice) return; mSlicers[slicer]->SetTSlice(tslice); - if (mSlicers[slicer]->GetImageActor()->GetVisibility()) - UpdateTSlice(slicer); + UpdateTSlice(slicer); } //---------------------------------------------------------------------------- @@ -574,7 +574,8 @@ void vvSlicerManager::UpdateViews(int current,int slicer) mSlicers[slicer]->Render(); for ( unsigned int i = 0; i < mSlicers.size(); i++) { - if (i != (unsigned int)slicer && mSlicers[i]->GetImageActor()->GetVisibility() + if (i != (unsigned int)slicer + && mSlicers[i]->GetRenderer()->GetDraw() && mSlicers[i]->GetRenderWindow()->GetSize()[0] > 2 && mSlicers[i]->GetRenderWindow()->GetSize()[1] > 2) { mSlicers[i]->SetCurrentPosition(mSlicers[slicer]->GetCurrentPosition()[0], @@ -863,7 +864,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer) Z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) { value = this->GetScalarComponentAsDouble(mSlicers[slicer]->GetInput(), X, Y, Z); - if (mSlicers[slicer]->GetVFActor() && mSlicers[slicer]->GetVFActor()->GetVisibility()) { + if (mSlicers[slicer]->GetVFActor() ) { displayVec = 1; unsigned int currentTime = mSlicers[slicer]->GetTSlice(); vtkImageData *vf = NULL; @@ -883,7 +884,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer) valueVec = sqrt(xVec*xVec + yVec*yVec + zVec*zVec); } } - if (mSlicers[slicer]->GetOverlayActor() && mSlicers[slicer]->GetOverlayActor()->GetVisibility()) { + if (mSlicers[slicer]->GetOverlayActor() ) { displayOver = 1; vtkImageData *overlay = dynamic_cast(mSlicers[slicer]->GetOverlayMapper()->GetInput()); double Xover = (x - overlay->GetOrigin()[0]) / overlay->GetSpacing()[0]; @@ -891,7 +892,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer) double Zover = (z - overlay->GetOrigin()[2]) / overlay->GetSpacing()[2]; valueOver = this->GetScalarComponentAsDouble(overlay, Xover, Yover, Zover); } - if (mSlicers[slicer]->GetFusionActor() && mSlicers[slicer]->GetFusionActor()->GetVisibility()) { + if (mSlicers[slicer]->GetFusionActor() ) { displayFus = 1; vtkImageData *fusion = dynamic_cast(mSlicers[slicer]->GetFusionMapper()->GetInput()); double Xover = (x - fusion->GetOrigin()[0]) / fusion->GetSpacing()[0]; @@ -904,12 +905,6 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer) emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec); emit UpdateOverlay(displayOver,valueOver,value); emit UpdateFusion(displayFus,valueFus); - for (unsigned int i = 0; i < mSlicers.size(); i++) { - if (mSlicers[i]->GetImageActor()->GetVisibility() == 1) - emit UpdateWindows(i,mSlicers[i]->GetSliceOrientation(),mSlicers[i]->GetSlice()); - else - emit UpdateWindows(i,-1,-1); - } } } //---------------------------------------------------------------------------- @@ -1049,14 +1044,6 @@ void vvSlicerManager::SetLocalColorWindowing(const int slicer) //---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- -void vvSlicerManager::SetColorMap() -{ - SetColorMap(mColorMap); -} -//---------------------------------------------------------------------------- - - //---------------------------------------------------------------------------- void vvSlicerManager::SetColorMap(int colormap) { @@ -1108,27 +1095,51 @@ void vvSlicerManager::SetColorMap(int colormap) LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); LUT->Build(); } - vtkLookupTable* fusLUT = NULL; - if (mSlicers[0]->GetFusion()) { - fusLUT = vtkLookupTable::New(); + vtkWindowLevelLookupTable* fusLUT = NULL; + if (mSlicers[0]->GetFusion()) { // && mFusionColorMap != 0) { + fusLUT = vtkWindowLevelLookupTable::New(); double fusRange [2]; fusRange[0] = mFusionLevel - mFusionWindow/2; fusRange[1] = mFusionLevel + mFusionWindow/2; - fusLUT->SetTableRange(fusRange[0],fusRange[1]); + double* frange = mFusionReader->GetOutput()->GetVTKImages()[0]->GetScalarRange(); + fusLUT->SetTableRange(frange); fusLUT->SetValueRange(1,1); fusLUT->SetSaturationRange(1,1); + fusLUT->SetAlphaRange(1, 1); + fusLUT->SetWindow(mFusionWindow); + fusLUT->SetLevel(mFusionLevel); if (mFusionColorMap == 1) fusLUT->SetHueRange(0,0.18); else if (mFusionColorMap == 2) fusLUT->SetHueRange(0.4,0.80); else if (mFusionColorMap == 3) + { + fusLUT->SetHueRange(0.666, 0); + fusLUT->SetValueRange(0.5, 1); + } + else if (mFusionColorMap == 4) fusLUT->SetHueRange(0,1); - fusLUT->Build(); - if (mFusionColorMap == 0) - fusLUT = NULL; + else if (mFusionColorMap == 0) + { + fusLUT->SetValueRange(0,1); + fusLUT->SetSaturationRange(0,0); + } + + fusLUT->ForceBuild(); + + // set color table transparancy + double alpha_range_end = frange[0] + (double)mFusionThresOpacity*(frange[1] - frange[0])/100; + for (double i = frange[0]; i < alpha_range_end; i++) { + double v[4]; + vtkIdType index = fusLUT->GetIndex(i); + fusLUT->GetTableValue(index, v); + v[3] = 0; + fusLUT->SetTableValue(index, v); + } } for ( unsigned int i = 0; i < mSlicers.size(); i++) { - if (mSlicers[i]->GetOverlay() && mSlicers[i]->GetOverlayActor()->GetVisibility()) { + + if (mSlicers[i]->GetOverlay()) { vtkLookupTable* supLUT = vtkLookupTable::New(); supLUT->SetTableRange(range[0],range[1]); supLUT->SetValueRange(1,1); @@ -1154,11 +1165,10 @@ void vvSlicerManager::SetColorMap(int colormap) } else { mSlicers[i]->GetWindowLevel()->SetLookupTable(LUT); } - if (mSlicers[i]->GetFusion() && mSlicers[i]->GetFusionActor()->GetVisibility()) { + + if (mSlicers[i]->GetFusion()) { mSlicers[i]->GetFusionActor()->SetOpacity(double(mFusionOpacity)/100); mSlicers[i]->GetFusionMapper()->SetLookupTable(fusLUT); - mSlicers[i]->GetFusionMapper()->SetWindow(mFusionWindow); - mSlicers[i]->GetFusionMapper()->SetLevel(mFusionLevel); } } if (fusLUT) diff --git a/vv/vvSlicerManager.h b/vv/vvSlicerManager.h index 680a59b..a148d19 100644 --- a/vv/vvSlicerManager.h +++ b/vv/vvSlicerManager.h @@ -113,7 +113,6 @@ class vvSlicerManager : public QObject { void SetColorLevel(double s); void SetLocalColorWindowing(const int slicer); void SetOpacity(int i, double factor); - void SetColorMap(); void SetColorMap(int colormap); void SetPreset(int preset); void SetOverlayColor(int color) { @@ -122,6 +121,9 @@ class vvSlicerManager : public QObject { void SetFusionOpacity(int opacity) { mFusionOpacity = opacity; } + void SetFusionThresholdOpacity(int thresOpacity) { + mFusionThresOpacity = thresOpacity; + } void SetFusionColorMap(int colorMap) { mFusionColorMap = colorMap; } @@ -147,6 +149,9 @@ class vvSlicerManager : public QObject { int GetFusionOpacity() { return mFusionOpacity; } + int GetFusionThresholdOpacity() { + return mFusionThresOpacity; + } int GetFusionColorMap() { return mFusionColorMap; } @@ -231,6 +236,7 @@ protected: int mOverlayColor; int mFusionOpacity; + int mFusionThresOpacity; int mFusionColorMap; double mFusionWindow; double mFusionLevel; diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index ab0e5f8..09a9545 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -217,6 +217,12 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->UpdateLinked(VisibleInWindow); return; } + if (KeyPress == "o") { + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(0,0,0,0); + this->SM->UpdateViews(1,VisibleInWindow); + this->SM->UpdateLinked(VisibleInWindow); + return; + } if (KeyPress == "F5") { this->SM->GetSlicer(VisibleInWindow)->FlipHorizontalView(); this->SM->GetSlicer(VisibleInWindow)->Render(); diff --git a/vv/vvToolCreatorBase.cxx b/vv/vvToolCreatorBase.cxx index 2744dd3..50a4489 100644 --- a/vv/vvToolCreatorBase.cxx +++ b/vv/vvToolCreatorBase.cxx @@ -22,7 +22,7 @@ #include //------------------------------------------------------------------------------ -vvToolCreatorBase::vvToolCreatorBase(QString name): mExperimental(false), mAction(NULL) +vvToolCreatorBase::vvToolCreatorBase(QString name): mAction(NULL), mExperimental(false) { mUseContextMenu = false; mToolName = name;