From: David Sarrut Date: Tue, 14 Jan 2014 07:10:44 +0000 (+0100) Subject: Add dcm extension X-Git-Tag: v1.4.0~140 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bbfe37a9a1137263d0de74651389c06d419564dc;p=clitk.git Add dcm extension --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index e4a6c55..d2c732f 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -103,9 +103,9 @@ It is distributed under dual licence #define COLUMN_IMAGE_NAME 7 #ifdef CLITK_PRIVATE_FEATURES -#define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz *.usf *.svl)" +#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 *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz)" +#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz)" #endif @@ -1005,7 +1005,7 @@ void vvMainWindow::CurrentImageChanged(std::string id) mSlicerManagers[selected]->GetTSlice()); landmarksPanel->SetCurrentPath(mInputPathName.toStdString()); landmarksPanel->SetCurrentImage(mSlicerManagers[selected]->GetFileName().c_str()); - + emit SelectedImageHasChanged(mSlicerManagers[selected]); } //------------------------------------------------------------------------------ @@ -1168,12 +1168,12 @@ void vvMainWindow::ImageInfoChanged() // infoPanel->setOrigin(GetVectorDoubleAsString(origin)); // infoPanel->setSpacing(GetVectorDoubleAsString(inputSpacing)); // infoPanel->setNPixel(QString::number(NPixel)+" ("+inputSizeInBytes+")"); -// +// // landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(), // mSlicerManagers[index]->GetTSlice()); // landmarksPanel->SetCurrentPath(mInputPathName.toStdString()); // landmarksPanel->SetCurrentImage(mSlicerManagers[index]->GetFileName().c_str()); -// +// // overlayPanel->getCurrentImageName(mSlicerManagers[index]->GetFileName().c_str()); // for (int i = 0; i < 4; i++) { // if (DataTree->selectedItems()[0]->data(i+1,Qt::CheckStateRole).toInt() > 0 || i == 3) { @@ -1444,7 +1444,7 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column) clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0); // Children - std::map actorTypeCounts; + 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(); @@ -1562,7 +1562,7 @@ void vvMainWindow::CloseImage(QTreeWidgetItem* item, int column) if (DataTree->topLevelItem(index)->child(child) == item) break; } if (overlay_type=="fusionSequence") { - //removing the overlay sequence in a fusion sequence visualization mode + //removing the overlay sequence in a fusion sequence visualization mode //reset the transforms overlayPanel->getFusionSequenceProperty(-1, false, 0, false); @@ -1684,12 +1684,12 @@ void vvMainWindow::ReloadImage(QTreeWidgetItem* item, int column) else if (role == "fusionSequence") { //both versions of the secondary sequence must be updated. mSlicerManagers[index]->ReloadFusionSequence(); - mSlicerManagers[mSlicerManagers[index]->GetFusionSequenceIndexOfLinkedManager()]->Reload(); + mSlicerManagers[mSlicerManagers[index]->GetFusionSequenceIndexOfLinkedManager()]->Reload(); } else { mSlicerManagers[index]->Reload(); //if we update the secondary sequence, then the overlay of the main sequence should also be updated - if (mSlicerManagers[index]->IsSecondarySequenceOfFusionSequence()) mSlicerManagers[mSlicerManagers[index]->GetFusionSequenceIndexOfLinkedManager()]->ReloadFusionSequence(); + if (mSlicerManagers[index]->IsSecondarySequenceOfFusionSequence()) mSlicerManagers[mSlicerManagers[index]->GetFusionSequenceIndexOfLinkedManager()]->ReloadFusionSequence(); } // Update view and info ImageInfoChanged(); @@ -1758,7 +1758,7 @@ void vvMainWindow::WindowLevelChanged() mSlicerManagers[index]->GetFusionLevel()); if (mSlicerManagers[index]->IsMainSequenceOfFusionSequence()) { overlayPanel->getFusionSequenceProperty(mSlicerManagers[index]->GetFusionSequenceFrameIndex(), - mSlicerManagers[index]->GetFusionSequenceSpatialSyncFlag(), + mSlicerManagers[index]->GetFusionSequenceSpatialSyncFlag(), mSlicerManagers[index]->GetFusionSequenceNbFrames(), mSlicerManagers[index]->GetFusionSequenceTemporalSyncFlag()); } @@ -1772,7 +1772,7 @@ void vvMainWindow::WindowLevelChanged() mSlicerManagers[ind]->GetFusionWindow(), mSlicerManagers[ind]->GetFusionLevel()); overlayPanel->getFusionSequenceProperty(mSlicerManagers[ind]->GetFusionSequenceFrameIndex(), - mSlicerManagers[ind]->GetFusionSequenceSpatialSyncFlag(), + mSlicerManagers[ind]->GetFusionSequenceSpatialSyncFlag(), mSlicerManagers[ind]->GetFusionSequenceNbFrames(), mSlicerManagers[ind]->GetFusionSequenceTemporalSyncFlag()); } @@ -2230,7 +2230,7 @@ void vvMainWindow::AddLandmarks(int index, std::vector files) { if (!landmarksPanel->LoadFromFile(files)) QMessageBox::information(this,tr("Problem reading Landmarks !"),"File doesn't exist!"); - + landmarksPanel->SetCurrentPath(mInputPathName.toStdString()); landmarksPanel->SetCurrentImage(mSlicerManagers[index]->GetFileName().c_str()); } @@ -2249,12 +2249,12 @@ void vvMainWindow::OpenField() return; } - QString Extensions = "Images ( *.mhd)"; - Extensions += ";;Images ( *.mha)"; - Extensions += ";;VF Images ( *.vf)"; - Extensions += ";;nii Images ( *.nii)"; - Extensions += ";;nrrd Images ( *.nrrd)"; - Extensions += ";;nhdr Images ( *.nhdr)"; + QString Extensions = "Images ( *.mhd *.mha *.vf *.nii *.nrrd *.nhdr)"; + // Extensions += ";;Images ( *.mha)"; + // Extensions += ";;VF Images ( *.vf)"; + // Extensions += ";;nii Images ( *.nii)"; + // Extensions += ";;nrrd Images ( *.nrrd)"; + // Extensions += ";;nhdr Images ( *.nhdr)"; Extensions += ";;All Files (*)"; QString file = QFileDialog::getOpenFileName(this,tr("Load deformation field"),mInputPathName,Extensions); if (!file.isEmpty()) @@ -2489,8 +2489,8 @@ std::cout<<"nbFrameMain = "<SetFileName(fn.c_str()); writer->SetInput(windowToImageFilter->GetOutput()); @@ -3657,4 +3657,3 @@ void vvMainWindow::UpdateCurrentSlicer() mSlicerManagerCurrentIndex = index; } //------------------------------------------------------------------------------ -