#include "vvMeshReader.h"
#include "vvSaveState.h"
#include "vvReadState.h"
-#ifdef CLITK_USE_PACS_CONNECTION
+#if CLITK_USE_PACS_CONNECTION
#include "vvQPacsConnection.h"
#endif
#include "clitkConfiguration.h"
#include <vtkPNGWriter.h>
#include <vtkJPEGWriter.h>
#include <vtkGenericMovieWriter.h>
-#ifdef CLITK_EXPERIMENTAL
-# include <vvAnimatedGIFWriter.h>
-#endif
+#include <vvAnimatedGIFWriter.h>
#ifdef VTK_USE_VIDEO_FOR_WINDOWS
# include <vtkAVIWriter.h>
#endif
#define COLUMN_RELOAD_IMAGE 6
#define COLUMN_IMAGE_NAME 7
-#ifdef CLITK_PRIVATE_FEATURES
-#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz *.usf *.svl)"
-#else
-#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz)"
-#endif
+#include <extensions.h>
/*Data Tree values
contextActions.push_back(actionAdd_USSequence_toCT);
#endif
+ contextMenu.addAction(actionAdd_wipe_image);
+ contextActions.push_back(actionAdd_wipe_image);
+
contextMenu.addSeparator();
QAction* actionResetMatrix = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/identity.png")),
documentation = new vvDocumentation();
help_dialog = new vvHelpDialog();
dicomSeriesSelector = new vvDicomSeriesSelector();
-#ifdef CLITK_USE_PACS_CONNECTION
+#if CLITK_USE_PACS_CONNECTION
PacsConnection = new vvQPacsConnection();
#endif
actionAdd_VF_to_current_Image->setEnabled(0);
actionAdd_fusion_image->setEnabled(0);
actionAdd_USSequence_toCT->setEnabled(0);
+ actionAdd_wipe_image->setEnabled(0);
//init the sliders
verticalSliders.push_back(NOVerticalSlider);
connect(actionWarp_image_with_vector_field,SIGNAL(triggered()),this,SLOT(WarpImage()));
connect(actionLoad_images,SIGNAL(triggered()),this,SLOT(OpenImages()));
connect(actionOpen_Dicom,SIGNAL(triggered()),this,SLOT(OpenDicom()));
- #ifdef CLITK_USE_PACS_CONNECTION
-connect(actionConnect_Pacs,SIGNAL(triggered()),this,SLOT(ConnectPacs()));
+#if CLITK_USE_PACS_CONNECTION
+ connect(actionConnect_Pacs,SIGNAL(triggered()),this,SLOT(ConnectPacs()));
#endif
// connect(actionOpen_Dicom_Struct,SIGNAL(triggered()),this,SLOT(OpenDCStructContour()));
connect(actionOpen_VTK_contour,SIGNAL(triggered()),this,SLOT(OpenVTKContour()));
connect(actionRead_saved_state,SIGNAL(triggered()),this,SLOT(ReadSavedState()));
connect(actionExit,SIGNAL(triggered()),this,SLOT(close()));
connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField()));
+ connect(actionAdd_wipe_image,SIGNAL(triggered()),this,SLOT(SelectWipeImage()));
connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(SelectFusionImage()));
connect(actionAdd_overlay_image_to_current_image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));
connect(actionAdd_USSequence_toCT,SIGNAL(triggered()), this,SLOT(SelectFusionSequence()));
menuExperimental->menuAction()->setVisible(false);
#endif
+#if !CLITK_USE_PACS_CONNECTION
+ actionConnect_Pacs->setVisible(false);
+#endif
+
QTimer * timerMemory = new QTimer(this);
//timerMemory->setInterval(5);
connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage()));
LoadImages(files, vvImageReader::DICOM);
}
}
-#ifdef CLITK_USE_PACS_CONNECTION
+#if CLITK_USE_PACS_CONNECTION
void vvMainWindow::ConnectPacs()
{
std::vector<std::string> files;
actionSave_As->setEnabled(1);
actionAdd_VF_to_current_Image->setEnabled(1);
actionAdd_fusion_image->setEnabled(1);
+ actionAdd_wipe_image->setEnabled(1);
actionAdd_overlay_image_to_current_image->setEnabled(1);
actionAdd_USSequence_toCT->setEnabled(1);
actionNorth_East_Window->setEnabled(1);
}
//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+void vvMainWindow::SelectWipeImage()
+{
+ int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+
+
+ if (!(CheckAddedImage(index, "wipe")))
+ return;
+
+ vvWipeImage::Pointer wipeImage = vvWipeImage::New();
+ wipeImage->Initialize(mInputPathName, mSlicerManagers);
+ wipeImage->selectWipeImage(index, GetTree());
+ QTreeWidgetItem *item = DataTree->itemAt(index, COLUMN_CLOSE_IMAGE);
+ //connect(item,SIGNAL(clickedInto(QTreeWidgetItem*, int)), this,SLOT(CloseImage(QTreeWidgetItem*, int)));
+ UpdateTree();
+ ImageInfoChanged();
+ for(int i=0; i<4; i++)
+ DisplaySliders(index, i);
+ WindowLevelChanged();
+
+ /*QString Extensions = EXTENSIONS;
+ Extensions += ";;All Files (*)";
+ QStringList files = QFileDialog::getOpenFileNames(this,tr("Load Wipe image"),mInputPathName,Extensions);
+ if (files.isEmpty())
+ return;
+
+ std::vector<std::string> vecFileNames;
+ for (int i = 0; i < files.size(); i++) {
+ vecFileNames.push_back(files[i].toStdString());
+ }*/
+
+ //AddWipeImage(index,vecFileNames,vvImageReader::IMAGE);
+}
+//------------------------------------------------------------------------------
+
+
//------------------------------------------------------------------------------
void vvMainWindow::SelectFusionImage()
{
#ifdef VTK_USE_MPEG2_ENCODER
Extensions += ";;Video( *.mpg)";
#endif
-#ifdef CLITK_EXPERIMENTAL
Extensions += ";;Video( *.gif)";
-#endif
int smIndex=GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
QString fileName = QFileDialog::getSaveFileName(this,
// Video
vtkGenericMovieWriter *vidwriter = NULL;
-#if CLITK_EXPERIMENTAL == 1
if (ext==".gif") {
vvAnimatedGIFWriter *gif = vvAnimatedGIFWriter::New();
vidwriter = gif;
msgBox.addButton(tr("No"), QMessageBox::RejectRole);
gif->SetDither(msgBox.exec() == QMessageBox::AcceptRole);
}
-#endif
#ifdef VTK_USE_VIDEO_FOR_WINDOWS
if (ext==".avi") {
vtkAVIWriter *mpg = vtkAVIWriter::New();