@@ -55,11 +55,7 @@ dlg_modalities::dlg_modalities(iAFast3DMagicLensWidget* magicLensWidget,
55
55
56
56
modalities(new iAModalityList),
57
57
m_magicLensWidget(magicLensWidget),
58
- m_mainRenderer(mainRenderer),
59
- m_showSlicers(false ),
60
- m_plane1(nullptr ),
61
- m_plane2(nullptr ),
62
- m_plane3(nullptr )
58
+ m_mainRenderer(mainRenderer)
63
59
{
64
60
connect (pbAdd, SIGNAL (clicked ()), this , SLOT (AddClicked ()));
65
61
connect (pbRemove, SIGNAL (clicked ()), this , SLOT (RemoveClicked ()));
@@ -101,7 +97,7 @@ bool CanHaveMultipleChannels(QString const & fileName)
101
97
void dlg_modalities::AddClicked ()
102
98
{
103
99
QString fileName = QFileDialog::getOpenFileName (this , tr (" Load" ),
104
- " " ,
100
+ modalities-> size () > 0 ? QFileInfo (modalities-> Get ( 0 )-> GetFileName ()). absolutePath () : " " ,
105
101
iAIOProvider::GetSupportedLoadFormats () + tr (" Volume Stack (*.volstack);;" ));
106
102
if (fileName.isEmpty ())
107
103
return ;
@@ -406,9 +402,8 @@ void dlg_modalities::RendererMouseMoved()
406
402
}
407
403
}
408
404
409
- void dlg_modalities::ShowSlicers (bool enabled)
405
+ void dlg_modalities::ShowSlicers (bool enabled, vtkPlane* plane1, vtkPlane* plane2, vtkPlane* plane3 )
410
406
{
411
- m_showSlicers = enabled;
412
407
for (int i = 0 ; i < modalities->size (); ++i)
413
408
{
414
409
QSharedPointer<iAVolumeRenderer> renderer = modalities->Get (i)->GetRenderer ();
@@ -419,7 +414,7 @@ void dlg_modalities::ShowSlicers(bool enabled)
419
414
}
420
415
if (enabled)
421
416
{
422
- renderer->SetCuttingPlanes (m_plane1, m_plane2, m_plane3 );
417
+ renderer->SetCuttingPlanes (plane1, plane2, plane3 );
423
418
}
424
419
else
425
420
{
@@ -428,13 +423,6 @@ void dlg_modalities::ShowSlicers(bool enabled)
428
423
}
429
424
}
430
425
431
- void dlg_modalities::SetSlicePlanes (vtkPlane* plane1, vtkPlane* plane2, vtkPlane* plane3)
432
- {
433
- m_plane1 = plane1;
434
- m_plane2 = plane2;
435
- m_plane3 = plane3;
436
- }
437
-
438
426
void dlg_modalities::AddModality (vtkSmartPointer<vtkImageData> img, QString const & name)
439
427
{
440
428
QSharedPointer<iAModality> newModality (new iAModality (name, " " , -1 , img, iAModality::MainRenderer));
0 commit comments