diff --git a/Modules/DiffusionImaging/FiberTracking/cmdapps/Tractography/StreamlineTractography.cpp b/Modules/DiffusionImaging/FiberTracking/cmdapps/Tractography/StreamlineTractography.cpp index d2125a9725..31fdfb099e 100755 --- a/Modules/DiffusionImaging/FiberTracking/cmdapps/Tractography/StreamlineTractography.cpp +++ b/Modules/DiffusionImaging/FiberTracking/cmdapps/Tractography/StreamlineTractography.cpp @@ -1,505 +1,505 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define _USE_MATH_DEFINES #include const int numOdfSamples = 200; typedef itk::Image< itk::Vector< float, numOdfSamples > , 3 > SampledShImageType; /*! \brief */ int main(int argc, char* argv[]) { mitkCommandLineParser parser; parser.setTitle("Streamline Tractography"); parser.setCategory("Fiber Tracking and Processing Methods"); parser.setDescription("Perform streamline tractography"); parser.setContributor("MIC"); // parameters fo all methods parser.setArgumentPrefix("--", "-"); parser.beginGroup("1. Mandatory arguments:"); parser.addArgument("input", "i", mitkCommandLineParser::StringList, "Input:", "input image (multiple possible for 'DetTensor' algorithm)", us::Any(), false); parser.addArgument("algorithm", "a", mitkCommandLineParser::String, "Algorithm:", "which algorithm to use (Peaks, DetTensor, ProbTensor, DetODF, ProbODF, DetRF, ProbRF)", us::Any(), false); parser.addArgument("out", "o", mitkCommandLineParser::OutputDirectory, "Output:", "output fiberbundle/probability map", us::Any(), false); parser.endGroup(); parser.beginGroup("2. Seeding:"); parser.addArgument("seeds", "", mitkCommandLineParser::Int, "Seeds per voxel:", "number of seed points per voxel", 1); parser.addArgument("seed_image", "", mitkCommandLineParser::String, "Seed image:", "mask image defining seed voxels", us::Any()); parser.addArgument("trials_per_seed", "", mitkCommandLineParser::Int, "Max. trials per seed:", "try each seed N times until a valid streamline is obtained (only for probabilistic tractography)", 10); parser.addArgument("max_tracts", "", mitkCommandLineParser::Int, "Max. number of tracts:", "tractography is stopped if the reconstructed number of tracts is exceeded", -1); parser.endGroup(); parser.beginGroup("3. Tractography constraints:"); parser.addArgument("tracking_mask", "", mitkCommandLineParser::String, "Mask image:", "streamlines leaving the mask will stop immediately", us::Any()); parser.addArgument("stop_image", "", mitkCommandLineParser::String, "Stop image:", "streamlines entering the mask will stop immediately", us::Any()); parser.addArgument("target_image", "", mitkCommandLineParser::String, "Target image:", "effact depends on the chosen endpoint constraint (option ep_constraint)", us::Any()); parser.addArgument("ep_constraint", "", mitkCommandLineParser::String, "Endpoint constraint:", "determines which fibers are accepted based on their endpoint location - options are NONE, EPS_IN_TARGET, EPS_IN_TARGET_LABELDIFF, EPS_IN_SEED_AND_TARGET, MIN_ONE_EP_IN_TARGET, ONE_EP_IN_TARGET and NO_EP_IN_TARGET", us::Any()); parser.endGroup(); parser.beginGroup("4. Streamline integration parameters:"); parser.addArgument("sharpen_odfs", "", mitkCommandLineParser::Bool, "SHarpen ODFs:", "if you are using dODF images as input, it is advisable to sharpen the ODFs (min-max normalize and raise to the power of 4). this is not necessary for CSD fODFs, since they are narurally much sharper."); parser.addArgument("cutoff", "", mitkCommandLineParser::Float, "Cutoff:", "set the FA, GFA or Peak amplitude cutoff for terminating tracks", 0.1); - parser.addArgument("odf_cutoff", "", mitkCommandLineParser::Float, "ODF Cutoff:", "threshold on the ODF magnitude. this is useful in case of CSD fODF tractography.", 0.1); + parser.addArgument("odf_cutoff", "", mitkCommandLineParser::Float, "ODF Cutoff:", "threshold on the ODF magnitude. this is useful in case of CSD fODF tractography.", 0.0); parser.addArgument("step_size", "", mitkCommandLineParser::Float, "Step size:", "step size (in voxels)", 0.5); parser.addArgument("min_tract_length", "", mitkCommandLineParser::Float, "Min. tract length:", "minimum fiber length (in mm)", 20); - parser.addArgument("angular_threshold", "", mitkCommandLineParser::Float, "Angular threshold:", "angular threshold between two successive steps, (default: 90° * step_size)"); - parser.addArgument("loop_check", "", mitkCommandLineParser::Float, "Check for loops:", "threshold on angular stdev over the last 4 voxel lengths", -1); + parser.addArgument("angular_threshold", "", mitkCommandLineParser::Float, "Angular threshold:", "angular threshold between two successive steps, (default: 90° * step_size, minimum 15°)"); + parser.addArgument("loop_check", "", mitkCommandLineParser::Float, "Check for loops:", "threshold on angular stdev over the last 4 voxel lengths"); parser.endGroup(); parser.beginGroup("5. Neighborhood sampling:"); parser.addArgument("num_samples", "", mitkCommandLineParser::Int, "Num. neighborhood samples:", "number of neighborhood samples that are use to determine the next progression direction", 0); parser.addArgument("sampling_distance", "", mitkCommandLineParser::Float, "Sampling distance:", "distance of neighborhood sampling points (in voxels)", 0.25); parser.addArgument("use_stop_votes", "", mitkCommandLineParser::Bool, "Use stop votes:", "use stop votes"); parser.addArgument("use_only_forward_samples", "", mitkCommandLineParser::Bool, "Use only forward samples:", "use only forward samples"); parser.endGroup(); parser.beginGroup("6. Tensor tractography specific:"); parser.addArgument("tend_f", "", mitkCommandLineParser::Float, "Weight f", "weighting factor between first eigenvector (f=1 equals FACT tracking) and input vector dependent direction (f=0).", 1.0); parser.addArgument("tend_g", "", mitkCommandLineParser::Float, "Weight g", "weighting factor between input vector (g=0) and tensor deflection (g=1 equals TEND tracking)", 0.0); parser.endGroup(); parser.beginGroup("7. Random forest tractography specific:"); parser.addArgument("forest", "", mitkCommandLineParser::String, "Forest:", "input random forest (HDF5 file)", us::Any()); parser.addArgument("use_sh_features", "", mitkCommandLineParser::Bool, "Use SH features:", "use SH features"); parser.endGroup(); parser.beginGroup("8. Additional input:"); parser.addArgument("additional_images", "", mitkCommandLineParser::StringList, "Additional images:", "specify a list of float images that hold additional information (FA, GFA, additional features for RF tractography)", us::Any()); parser.endGroup(); parser.beginGroup("9. Misc:"); parser.addArgument("flip_x", "", mitkCommandLineParser::Bool, "Flip X:", "multiply x-coordinate of direction proposal by -1"); parser.addArgument("flip_y", "", mitkCommandLineParser::Bool, "Flip Y:", "multiply y-coordinate of direction proposal by -1"); parser.addArgument("flip_z", "", mitkCommandLineParser::Bool, "Flip Z:", "multiply z-coordinate of direction proposal by -1"); parser.addArgument("no_data_interpolation", "", mitkCommandLineParser::Bool, "Don't interpolate input data:", "don't interpolate input image values"); parser.addArgument("no_mask_interpolation", "", mitkCommandLineParser::Bool, "Don't interpolate masks:", "don't interpolate mask image values"); parser.addArgument("compress", "", mitkCommandLineParser::Float, "Compress:", "compress output fibers using the given error threshold (in mm)"); parser.endGroup(); std::map parsedArgs = parser.parseArguments(argc, argv); if (parsedArgs.size()==0) return EXIT_FAILURE; mitkCommandLineParser::StringContainerType input_files = us::any_cast(parsedArgs["input"]); std::string outFile = us::any_cast(parsedArgs["out"]); std::string algorithm = us::any_cast(parsedArgs["algorithm"]); bool sharpen_odfs = false; if (parsedArgs.count("sharpen_odfs")) sharpen_odfs = us::any_cast(parsedArgs["sharpen_odfs"]); bool interpolate = true; if (parsedArgs.count("no_data_interpolation")) interpolate = !us::any_cast(parsedArgs["no_data_interpolation"]); bool mask_interpolation = true; if (parsedArgs.count("no_mask_interpolation")) interpolate = !us::any_cast(parsedArgs["no_mask_interpolation"]); bool use_sh_features = false; if (parsedArgs.count("use_sh_features")) use_sh_features = us::any_cast(parsedArgs["use_sh_features"]); bool use_stop_votes = false; if (parsedArgs.count("use_stop_votes")) use_stop_votes = us::any_cast(parsedArgs["use_stop_votes"]); bool use_only_forward_samples = false; if (parsedArgs.count("use_only_forward_samples")) use_only_forward_samples = us::any_cast(parsedArgs["use_only_forward_samples"]); bool flip_x = false; if (parsedArgs.count("flip_x")) flip_x = us::any_cast(parsedArgs["flip_x"]); bool flip_y = false; if (parsedArgs.count("flip_y")) flip_y = us::any_cast(parsedArgs["flip_y"]); bool flip_z = false; if (parsedArgs.count("flip_z")) flip_z = us::any_cast(parsedArgs["flip_z"]); bool apply_image_rotation = false; if (parsedArgs.count("apply_image_rotation")) apply_image_rotation = us::any_cast(parsedArgs["apply_image_rotation"]); float compress = -1; if (parsedArgs.count("compress")) compress = us::any_cast(parsedArgs["compress"]); float min_tract_length = 20; if (parsedArgs.count("min_tract_length")) min_tract_length = us::any_cast(parsedArgs["min_tract_length"]); float loop_check = -1; if (parsedArgs.count("loop_check")) loop_check = us::any_cast(parsedArgs["loop_check"]); std::string forestFile; if (parsedArgs.count("forest")) forestFile = us::any_cast(parsedArgs["forest"]); std::string maskFile = ""; if (parsedArgs.count("tracking_mask")) maskFile = us::any_cast(parsedArgs["tracking_mask"]); std::string seedFile = ""; if (parsedArgs.count("seed_image")) seedFile = us::any_cast(parsedArgs["seed_image"]); std::string targetFile = ""; if (parsedArgs.count("target_image")) targetFile = us::any_cast(parsedArgs["target_image"]); std::string stopFile = ""; if (parsedArgs.count("stop_image")) stopFile = us::any_cast(parsedArgs["stop_image"]); std::string ep_constraint = "NONE"; if (parsedArgs.count("ep_constraint")) ep_constraint = us::any_cast(parsedArgs["ep_constraint"]); float cutoff = 0.1; if (parsedArgs.count("cutoff")) cutoff = us::any_cast(parsedArgs["cutoff"]); - float odf_cutoff = 0.1; + float odf_cutoff = 0.0; if (parsedArgs.count("odf_cutoff")) odf_cutoff = us::any_cast(parsedArgs["odf_cutoff"]); float stepsize = -1; if (parsedArgs.count("step_size")) stepsize = us::any_cast(parsedArgs["step_size"]); float sampling_distance = -1; if (parsedArgs.count("sampling_distance")) sampling_distance = us::any_cast(parsedArgs["sampling_distance"]); int num_samples = 0; if (parsedArgs.count("num_samples")) num_samples = us::any_cast(parsedArgs["num_samples"]); int seeds = 1; if (parsedArgs.count("seeds")) seeds = us::any_cast(parsedArgs["seeds"]); unsigned int trials_per_seed = 10; if (parsedArgs.count("trials_per_seed")) trials_per_seed = us::any_cast(parsedArgs["trials_per_seed"]); float tend_f = 1; if (parsedArgs.count("tend_f")) tend_f = us::any_cast(parsedArgs["tend_f"]); float tend_g = 0; if (parsedArgs.count("tend_g")) tend_g = us::any_cast(parsedArgs["tend_g"]); float angular_threshold = -1; if (parsedArgs.count("angular_threshold")) angular_threshold = us::any_cast(parsedArgs["angular_threshold"]); unsigned int max_tracts = -1; if (parsedArgs.count("max_tracts")) max_tracts = us::any_cast(parsedArgs["max_tracts"]); std::string ext = itksys::SystemTools::GetFilenameExtension(outFile); if (ext != ".fib" && ext != ".trk") { MITK_INFO << "Output file format not supported. Use one of .fib, .trk, .nii, .nii.gz, .nrrd"; return EXIT_FAILURE; } // LOAD DATASETS mitkCommandLineParser::StringContainerType addFiles; if (parsedArgs.count("additional_images")) addFiles = us::any_cast(parsedArgs["additional_images"]); typedef itk::Image ItkFloatImgType; MITK_INFO << "loading input"; std::vector< mitk::Image::Pointer > input_images; for (unsigned int i=0; i(mitk::IOUtil::Load(input_files.at(i))[0].GetPointer()); input_images.push_back(mitkImage); } ItkFloatImgType::Pointer mask; if (!maskFile.empty()) { MITK_INFO << "loading mask image"; mitk::Image::Pointer img = dynamic_cast(mitk::IOUtil::Load(maskFile)[0].GetPointer()); mask = ItkFloatImgType::New(); mitk::CastToItkImage(img, mask); } ItkFloatImgType::Pointer seed; if (!seedFile.empty()) { MITK_INFO << "loading seed image"; mitk::Image::Pointer img = dynamic_cast(mitk::IOUtil::Load(seedFile)[0].GetPointer()); seed = ItkFloatImgType::New(); mitk::CastToItkImage(img, seed); } ItkFloatImgType::Pointer stop; if (!stopFile.empty()) { MITK_INFO << "loading stop image"; mitk::Image::Pointer img = dynamic_cast(mitk::IOUtil::Load(stopFile)[0].GetPointer()); stop = ItkFloatImgType::New(); mitk::CastToItkImage(img, stop); } ItkFloatImgType::Pointer target; if (!targetFile.empty()) { MITK_INFO << "loading target image"; mitk::Image::Pointer img = dynamic_cast(mitk::IOUtil::Load(targetFile)[0].GetPointer()); target = ItkFloatImgType::New(); mitk::CastToItkImage(img, target); } MITK_INFO << "loading additional images"; std::vector< std::vector< ItkFloatImgType::Pointer > > addImages; addImages.push_back(std::vector< ItkFloatImgType::Pointer >()); for (auto file : addFiles) { mitk::Image::Pointer img = dynamic_cast(mitk::IOUtil::Load(file)[0].GetPointer()); ItkFloatImgType::Pointer itkimg = ItkFloatImgType::New(); mitk::CastToItkImage(img, itkimg); addImages.at(0).push_back(itkimg); } // ////////////////////////////////////////////////////////////////// // omp_set_num_threads(1); if (algorithm == "ProbTensor") { typedef mitk::ImageToItk< mitk::TrackingHandlerTensor::ItkTensorImageType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(input_images.at(0)); caster->Update(); mitk::TrackingHandlerTensor::ItkTensorImageType::Pointer itkTensorImg = caster->GetOutput(); typedef itk::TensorImageToOdfImageFilter< float, float > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkTensorImg ); filter->Update(); mitk::Image::Pointer image = mitk::Image::New(); FilterType::OutputImageType::Pointer outimg = filter->GetOutput(); image->InitializeByItk( outimg.GetPointer() ); image->SetVolume( outimg->GetBufferPointer() ); input_images.clear(); input_images.push_back(image); sharpen_odfs = true; odf_cutoff = 0; } typedef itk::StreamlineTrackingFilter TrackerType; TrackerType::Pointer tracker = TrackerType::New(); mitk::TrackingDataHandler* handler; if (algorithm == "DetRF" || algorithm == "ProbRF") { mitk::TractographyForest::Pointer forest = dynamic_cast(mitk::IOUtil::Load(forestFile)[0].GetPointer()); if (forest.IsNull()) mitkThrow() << "Forest file " << forestFile << " could not be read."; if (use_sh_features) { handler = new mitk::TrackingHandlerRandomForest<6,28>(); dynamic_cast*>(handler)->SetForest(forest); dynamic_cast*>(handler)->AddDwi(input_images.at(0)); dynamic_cast*>(handler)->SetAdditionalFeatureImages(addImages); } else { handler = new mitk::TrackingHandlerRandomForest<6,100>(); dynamic_cast*>(handler)->SetForest(forest); dynamic_cast*>(handler)->AddDwi(input_images.at(0)); dynamic_cast*>(handler)->SetAdditionalFeatureImages(addImages); } if (algorithm == "ProbRF") handler->SetMode(mitk::TrackingDataHandler::MODE::PROBABILISTIC); } else if (algorithm == "Peaks") { handler = new mitk::TrackingHandlerPeaks(); typedef mitk::ImageToItk< mitk::TrackingHandlerPeaks::PeakImgType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(input_images.at(0)); caster->Update(); mitk::TrackingHandlerPeaks::PeakImgType::Pointer itkImg = caster->GetOutput(); dynamic_cast(handler)->SetPeakImage(itkImg); dynamic_cast(handler)->SetApplyDirectionMatrix(apply_image_rotation); dynamic_cast(handler)->SetPeakThreshold(cutoff); } else if (algorithm == "DetTensor") { handler = new mitk::TrackingHandlerTensor(); for (auto input_image : input_images) { typedef mitk::ImageToItk< mitk::TrackingHandlerTensor::ItkTensorImageType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(input_image); caster->Update(); mitk::TrackingHandlerTensor::ItkTensorImageType::ConstPointer itkImg = caster->GetOutput(); dynamic_cast(handler)->AddTensorImage(itkImg); } dynamic_cast(handler)->SetFaThreshold(cutoff); dynamic_cast(handler)->SetF(tend_f); dynamic_cast(handler)->SetG(tend_g); if (addImages.at(0).size()>0) dynamic_cast(handler)->SetFaImage(addImages.at(0).at(0)); } else if (algorithm == "DetODF" || algorithm == "ProbODF" || algorithm == "ProbTensor") { handler = new mitk::TrackingHandlerOdf(); typedef mitk::ImageToItk< mitk::TrackingHandlerOdf::ItkOdfImageType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(input_images.at(0)); caster->Update(); mitk::TrackingHandlerOdf::ItkOdfImageType::Pointer itkImg = caster->GetOutput(); dynamic_cast(handler)->SetOdfImage(itkImg); dynamic_cast(handler)->SetGfaThreshold(cutoff); dynamic_cast(handler)->SetOdfThreshold(odf_cutoff); dynamic_cast(handler)->SetSharpenOdfs(sharpen_odfs); if (algorithm == "ProbODF" || algorithm == "ProbTensor") dynamic_cast(handler)->SetMode(mitk::TrackingHandlerOdf::MODE::PROBABILISTIC); if (algorithm == "ProbTensor") dynamic_cast(handler)->SetIsOdfFromTensor(true); if (addImages.at(0).size()>0) dynamic_cast(handler)->SetGfaImage(addImages.at(0).at(0)); } else { MITK_INFO << "Unknown tractography algorithm (" + algorithm+"). Known types are Peaks, DetTensor, ProbTensor, DetODF, ProbODF, DetRF, ProbRF."; return EXIT_FAILURE; } handler->SetInterpolate(interpolate); handler->SetFlipX(flip_x); handler->SetFlipY(flip_y); handler->SetFlipZ(flip_z); if (ep_constraint=="NONE") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::NONE); else if (ep_constraint=="EPS_IN_TARGET") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_TARGET); else if (ep_constraint=="EPS_IN_TARGET_LABELDIFF") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_TARGET_LABELDIFF); else if (ep_constraint=="EPS_IN_SEED_AND_TARGET") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_SEED_AND_TARGET); else if (ep_constraint=="MIN_ONE_EP_IN_TARGET") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::MIN_ONE_EP_IN_TARGET); else if (ep_constraint=="ONE_EP_IN_TARGET") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::ONE_EP_IN_TARGET); else if (ep_constraint=="NO_EP_IN_TARGET") tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::NO_EP_IN_TARGET); MITK_INFO << "Tractography algorithm: " << algorithm; tracker->SetInterpolateMasks(mask_interpolation); tracker->SetNumberOfSamples(num_samples); tracker->SetAngularThreshold(angular_threshold); tracker->SetMaskImage(mask); tracker->SetSeedImage(seed); tracker->SetStoppingRegions(stop); tracker->SetTargetRegions(target); tracker->SetSeedsPerVoxel(seeds); tracker->SetStepSize(stepsize); tracker->SetSamplingDistance(sampling_distance); tracker->SetUseStopVotes(use_stop_votes); tracker->SetOnlyForwardSamples(use_only_forward_samples); tracker->SetLoopCheck(loop_check); tracker->SetMaxNumTracts(max_tracts); tracker->SetTrialsPerSeed(trials_per_seed); tracker->SetTrackingHandler(handler); if (ext != ".fib" && ext != ".trk") tracker->SetUseOutputProbabilityMap(true); tracker->SetMinTractLength(min_tract_length); tracker->Update(); if (ext == ".fib" || ext == ".trk") { vtkSmartPointer< vtkPolyData > poly = tracker->GetFiberPolyData(); mitk::FiberBundle::Pointer outFib = mitk::FiberBundle::New(poly); if (compress > 0) outFib->Compress(compress); mitk::IOUtil::Save(outFib, outFile); } else { TrackerType::ItkDoubleImgType::Pointer outImg = tracker->GetOutputProbabilityMap(); mitk::Image::Pointer img = mitk::Image::New(); img->InitializeByItk(outImg.GetPointer()); img->SetVolume(outImg->GetBufferPointer()); if (ext != ".nii" && ext != ".nii.gz" && ext != ".nrrd") outFile += ".nii.gz"; mitk::IOUtil::Save(img, outFile); } delete handler; return EXIT_SUCCESS; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsDataViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsDataViewControls.ui index cd6dd69285..5a68d94544 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsDataViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsDataViewControls.ui @@ -1,218 +1,269 @@ QmitkConnectomicsDataViewControls 0 0 - 227 + 231 639 0 0 QmitkTemplate - - + + + 25 + + Data - - + + + 0 + + + 0 + + + 0 + + + 0 + + QLabel { color: rgb(255, 0, 0) } - Please select data! + Select a parcellation and a tractogram! - + Image 1: - - + Image 2: - - + Network Creation Options - - + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Create a network from a parcellation and a fiber image + + + Networkify + + + + + + + Create Correlation Matrix + + + + + + + + Create Synthetic Networks + + + - - - - Create a network from a parcellation and a fiber image - - - Networkify - - - - - - - Create Correlation Matrix - - - - - - - Create Synthetic Networks - - - - + true Synthetic Network Options - - + + + 0 + + + 0 + + + 0 + + + 0 + + - + Parameter 1 false 9999 - + Parameter 2 false 3 999.899999999999977 - + 0 0 Anatomical labeling - - + + + 0 + + + 0 + + + 0 + + + 0 + + - + Qt::Vertical 20 40 QmitkFreeSurferParcellationWidget QWidget
QmitkFreeSurferParcellationWidget.h
1
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsNetworkOperationsViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsNetworkOperationsViewControls.ui index 6f694d8131..ff4edee6d1 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsNetworkOperationsViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsNetworkOperationsViewControls.ui @@ -1,237 +1,276 @@ QmitkConnectomicsNetworkOperationsViewControls 0 0 - 227 + 283 639 0 0 QmitkTemplate - - + + + 25 + + Data + + 0 + + + 0 + + + 0 + + + 0 + QLabel { color: rgb(255, 0, 0) } - Please select data! + Select a network or a parcellation! Image 1: - + + + + Convert the selected image to RGBA format + + + Turn Into RGBA Image + + + + + + + Assign FreeSurfer Colors + + + + + + + Divide in Modules + + + - - - - Convert the selected image to RGBA format - - - Turn Into RGBA Image - - - - - - - Assign FreeSurfer Colors - - - - - - - Divide in Modules - - - - + Connectivity Matrix Image Options - - + + + 0 + + + 0 + + + 0 + + + 0 + + Create Connectivity Matrix Image - + Rescale - + Binary - + Prune Options - - + + + 0 + + + 0 + + + 0 + + + 0 + + Prune Network - + Target Density 1.000000000000000 0.010000000000000 Target Threshold - + Threshold weight - + Threshold Below Density - + Random Removal Threshold - + Qt::Vertical 20 40 diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsStatisticsViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsStatisticsViewControls.ui index 5eb919aef6..b3d941a458 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsStatisticsViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkConnectomicsStatisticsViewControls.ui @@ -1,251 +1,296 @@ QmitkConnectomicsStatisticsViewControls 0 0 557 1218 0 0 QmitkTemplate - - + + + 25 + + Data - - + + + 0 + + + 0 + + + 0 + + + 0 + + QLabel { color: rgb(255, 0, 0) } - Please select data! + Select a network! - + Network: - - + Network Statistics - - - QFormLayout::AllNonFixedFieldsGrow + + + 0 + + + 0 - + + 0 + + + 0 + + true 0 0 true - + Informational Balloons. - - - QFormLayout::AllNonFixedFieldsGrow + + + 0 - - - - - 0 - 0 - + + 0 + + + 0 + + + 0 + + + + + false - - - MS Shell Dlg 2 - 8 - + + PointingHandCursor - - IBeamCursor + + Qt::RightToLeft - - false + + - + true + + false + - + false -1 12 QComboBox::InsertAlphabetically - - - - false + + + + + 0 + 0 + - - PointingHandCursor + + + MS Shell Dlg 2 + 8 + - - Qt::RightToLeft + + IBeamCursor - - + + false - + true - - false - - + Histograms - - + + + 0 + + + 0 + + + 0 + + + 0 + + 0 0 50 150 - + 50 150 - + 50 150 - + Qt::Vertical 20 40 QmitkNetworkHistogramCanvas QWidget
internal/QmitkNetworkHistogramCanvas.h
1
networkBalloonsNodeLabelsComboBox currentIndexChanged(int) networkBalloonsNodeLabelsComboBox setCurrentIndex(int) 360 409 360 409
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkRandomParcellationViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkRandomParcellationViewControls.ui index e60f45f3f8..2d6c8c7e09 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkRandomParcellationViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.connectomics/src/internal/QmitkRandomParcellationViewControls.ui @@ -1,244 +1,313 @@ QmitkRandomParcellationViewControls true 0 0 - 249 - 517 + 327 + 591 0 0 QmitkTemplate - - + + + 25 + + QLabel { color: rgb(255, 0, 0) } Please select an image! - + true Nodes false - - + + + 0 + + + 0 + + + 0 + + + 0 + + true Choose the number of nodes: - + 2 5000 - + true Merging - - + + + 0 + + + 0 + + + 0 + + + 0 + + Merging on - + false - QFrame::StyledPanel + QFrame::NoFrame QFrame::Raised - - + + + 0 + + + 0 + + + 0 + + + 0 + + According to the number of parcels - + false QFrame::StyledPanel QFrame::Raised - - + + + 0 + + + 0 + + + 0 + + Number of Parcels: - + 1 5000 - + According to the size of parcels - + false QFrame::StyledPanel QFrame::Raised - - + + + 0 + + + 0 + + + 0 + + Size of the smallest parcel: - + 2 100000 - + Just merge small parcels - + false Do image processing Select random nodes - + Qt::Vertical 20 40 - + Counting - - + + + 0 + + + 0 + + + 0 + + + 0 + + Number of voxels with value 1: - + Number of nodes: diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/plugin.xml index 971eeb1a8c..c9f2eddab2 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/plugin.xml @@ -1,24 +1,24 @@ - + - + - - - + + + diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/src/internal/QmitkDenoisingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/src/internal/QmitkDenoisingViewControls.ui index 340b789ecd..c735b2f757 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/src/internal/QmitkDenoisingViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.denoising/src/internal/QmitkDenoisingViewControls.ui @@ -1,345 +1,345 @@ QmitkDenoisingViewControls 0 0 351 734 0 0 QmitkTemplate - - - 6 - + 9 9 9 9 - + + 25 + + QFrame::NoFrame QFrame::Raised 0 0 0 0 Input Image: Total-variation Discrete Gaussian Non-local means Filter: - + Parameters 0 0 0 0 Lambda: 4 0.000000000000000 1.000000000000000 0.100000000000000 0.100000000000000 Iterations: 1 999 1 - + Parameters 0 0 0 0 Sampling Radius: 1 999 10 1 999 4 1 999 4 Num. Patches: 1 50 1 Iterations: Patch Size: - + Parameters 0 0 0 0 4 1.000000000000000 99999.000000000000000 0.100000000000000 1.000000000000000 Variance: - + Start - + Qt::Vertical 20 40 QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/documentation/UserManual/QmitkFiberfoxViewUserManual.dox b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/documentation/UserManual/QmitkFiberfoxViewUserManual.dox index acc3981702..981d333f71 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/documentation/UserManual/QmitkFiberfoxViewUserManual.dox +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/documentation/UserManual/QmitkFiberfoxViewUserManual.dox @@ -1,150 +1,149 @@ /** \page org_mitk_views_fiberfoxview Fiberfox DW-MRI Simulation This view provides the user interface for Fiberfox [1,2,3], an interactive simulation tool for defining artificial white matter fibers and generating corresponding diffusion-weighted images. Arbitrary fiber configurations like bent, crossing, kissing, twisting, and fanning bundles can be intuitively defined by positioning only a few 3D waypoints to trigger the automated generation of synthetic fibers. From these fibers a diffusion-weighted signal is simulated using a flexible combination of various diffusion models. Instead of using manually created artificial fiber bundles, fibers obtained in any other way, e.g. using fiber tractography, can be used to simulate the signal (Example: ISMRM Tractography Challenge). The simulation can be modified using specified acquisition settings such as gradient direction, b-value, image size, image resolution, echo time, and much more. Additionally it enables the simulation of magnetic resonance artifacts including thermal noise, Gibbs ringing, N/2 ghosting, aliasing, susceptibility distortions, eddy currents and motion artifacts. The employed parameters can be saved and loaded as xml file with the ending ".ffp" (Fiberfox parameters). It is furthermore possible to add artifacts to an already existing diffusion-weighted image. Available sections: - \ref QmitkFiberfoxViewUserManualFiberDefinition - \ref QmitkFiberfoxViewUserManualSignalGeneration - \ref QmitkFiberfoxViewUserManualKnownIssues - \ref QmitkFiberfoxViewUserManualReferences -\imageMacro{Fiberfox.png, "Fig. 1: Screenshot of the Fiberfox framework. The four render windows display an axial (top left)\, sagittal (top right) and coronal (bottom left) 2D cut as well as a 3D view of a synthetic fiber helix and the fiducials used to define its shape. In the 2D views the helix is superimposing the baseline volume of the corresponding diffusion-weighted image. The sagittal render window shows a close-up view on one of the circular fiducials.",16} \section QmitkFiberfoxViewUserManualFiberDefinition Fiber Definition Fiber strands are defined simply by placing markers in a 3D image volume. The fibers are then interpolated between these fiducials. Example: \li Chose an image volume to place the markers used to define the fiber pathway. If you don't have such an image available switch to the "Signal Generation" tab, define the size and spacing of the desired image and click "Generate Image". If no fiber bundle is selected, this will generate a dummy image that can be used to place the fiducials. \li Start placing fiducials at the desired positions to define the fiber pathway. To do that, click on the button with the circle pictogram, then click at the desired position and plane in the image volume and drag your mouse while keeping the button pressed to generate a circular shape. Adjust the shape using the control points (Fig. 2). The position of control point D introduces a twist of the fibers between two successive fiducials. The actual fiber generation is triggered automatically as soon as you place the second control point. \li In some cases the fibers are entangled in a way that can't be resolved by introducing an additional fiber twist. Fiberfox tries to avoid these situations, which arise from different normal orientations of succeeding fiducials, automatically. In rare cases this is not successful. Use the double-arrow button to flip the fiber positions of the selected fiducial in one dimension. Either the problem is resolved now or you can resolve it manually by adjusting the twist-control point. \li To create non elliptical fiber profile shapes switch to the Fiber Extraction View. This view provides tools to extract subesets of fibers from fiber bundles and enables to cut out arbitrary polygonal fiber shapes from existing bundles. \imageMacro{Fiberfox-Fiducial.png, "Fig. 2: Control points defining the actual shape of the fiducial. A specifies the fiducials position in space\, B and C the two ellipse radii and D the twisting angle between two successive fiducials.",10} Fiber Options: \li Real Time Fibers: If checked, each parameter adjustment (fiducial position, number of fibers, ...) will be directly applied to the selected fiber bundle. If unchecked, the fibers will only be generated if the corresponding button "Generate Fibers" is clicked. \li Fiber Distribution: Specifies if the fiber distribution inside the bundle follows a uniform or normal distribution. \li \# Fibers: Specifies the number of fibers that will be generated for the selected bundle. \li Advanced Options: Show/hide advanced options \li Fiber Sampling: Adjusts the distenace of the fiber sampling points (in mm). A higher sampling rate is needed if high curvatures are modeled. \li Tension, Continuity, Bias: Parameters controlling the shape of the splines interpolation the fiducials. See Wikipedia for details. Fiducial Options: \li Use Constant Fiducial Radius: If checked, all fiducials are treated as circles with the same radius. The first fiducial of the bundle defines the radius of all other fiducials. \li Align with grid: Click to shift the selected fiducial center points to the next voxel center. Operations: \li Rotation: Define the rotation of the selected fiber bundle around each axis (in degree). \li Translation: Define the translation of the selected fiber bundle along each axis (in mm). \li Scaling: Define a scaling factor for the selected fiber bundle in each dimension. \li Transform Selection: Apply specified rotation, translation and scaling to the selected Bundle/Fiducial \li Copy Bundles: Add copies of the selected fiber bundles to the datamanager. \li Join Bundles: Add new bundle to the datamanager that contains all fibers from the selected bundles. \li Include Fiducials: If checked, the specified transformation is also applied to the fiducials belonging to the selected fiber bundle and the fiducials are also copied. \section QmitkFiberfoxViewUserManualSignalGeneration Signal Generation To generate an artificial signal from the input fibers we follow the concepts recently presented by Panagiotaki et al. in a review and taxonomy of different compartment models: a flexible model combining multiple compartments is used to simulate the anisotropic diffusion inside (intra-axonal compartment) and between axons (inter-axonal compartment), isotropic diffusion outside of the axons (extra-axonal compartment 1) and the restricted diffusion in other cell types (extra-axonal compartment 2) weighted according to their respective volume fraction. A diffusion-weighted image is generated from the fibers by selecting the according fiber bundle in the "Fiber Bundle" combobox and clicking "Generate Image". If some other diffusion-weighted image is selected together with the fiber bundle, Fiberfox directly uses the parameters of the selected image (size, spacing, gradient directions, b-values) for the signal generation process. Additionally a binary image can be selected that defines the tissue area. Voxels outside of this mask will contain no signal, only noise and other effects induced by the acquisiton (ghosts etc.). If a save path is specified, the simualted image will be saved at this location. Eventually generated log files (e.g. recording the head motion) are also saved at this location. If not path is specified, the simualted image will only appear in the data manager and has to be saved manually. Logfiles are then saved in the system specific temp directory. If no fiber bundle but a diffusion-weighted image is selected, the specified artifacts are added to the selected image. In this mode, signal relaxation is disabled since multiple compartments are not available and the input image alrady contains relaxation effects. Also, introducing head motion is not possible since this qould require a contrast change in the weighted volumes. Basic Image Settings: \li Image Dimensions: Specifies actual image size (number of voxels in each dimension). \li Image Spacing: Specifies voxel size in mm. Beware that changing the voxel size also changes the signal strength, e.g. increasing the resolution from 2x2x2 mm to 1x1x1 mm decreases the signal obtained for each voxel by a factor 8. \li Gradient Directions: Number of gradients directions distributed equally over the half sphere. 10% baseline images are automatically added. \li b-Value: Diffusion weighting in s/mm². If an existing diffusion-weighted image is used to set the basic parameters, the b-value is defined by the gradient direction magnitudes of this image, which also enables the use of multiple b-values. Advanced Image Settings (activate checkbox "Advanced Options"): \li Acquisition Type: the default acquisition type is a single shot EPI, which acquires a complete k-space slice with one echo. Alternatively, a standard spin echo sequence can be chosen that uses a cartesian k-space sampling scheme and acquires one k-space line with one echo. \li Signal Scale: Additional scaling factor for the signal in each voxel. The default value of 100 results in a maximum signal amplitude of 800 for 2x2x2 mm voxels. Beware that changing this value without changing the noise variance results in a changed SNR. Adjustment of this value might be needed if the overall signal values are much too high or much too low (depends on a variety of factors like voxel size and relaxation times). \li Number of Channels: Specify the number of coil elements used for the acquisition. The coil elements are circularly arranged around the objects z-axis. Currently the coil distance to the currently imaged object slice in z-direction is not taken into account, so the coil basically seems to move with the currently imaged slice along the z-axis. The signals obtained from the individual coil elements are combined using a sum of squares approach. Beware that the simulation time scales linearly with the number of coils! \li Coil Sensitivity: Using multiple acquisition channels only makes sense if the coil elements have a non-constant sensitivity profile. At the moment linearly as well as exponantially decreasing coil sensitivities are implemented. Using a constant coil sensitivity, the signal received by each coil element is equal regardless of the distance to the coil. In case of a non-constant sensitivity profile the received signal intensities decrease with increasing distance from the coil element. Using a linear profile, about 50% of the signal originating from the slice center is received. In case of an exponential coil sensitivity, only about 32% of the signal originating from the slice center is received. \li Echo Time TE: Time between the 90° excitation pulse and the first spin echo. Increasing this time results in a stronger T2-relaxation effect (Wikipedia). \li Repetition Time TR: Time between two 90° RF pulses. Important for T1 contrast (use short TE and TR for strong T1 weighting). \li Dwell Time: Time to read one line in k-space. Increasing this time results in a stronger T2* effect which causes an attenuation of the higher frequencies in phase direction (here along y-axis) which again results in a blurring effect of sharp edges perpendicular to the phase direction. \li Tinhom Relaxation (T2'): Time constant specifying the signal decay due to magnetic field inhomogeneities (also called T2'). Together with the tissue specific relaxation time constant T2 this defines the T2* decay constant: T2*=(T2 T2')/(T2+T2') \li Fiber Radius (in µm): Used to calculate the volume fractions of the used compartments (fiber, water, etc.). If set to 0 (default) the fiber radius is set automatically so that the voxel containing the most fibers is filled completely. A realistic axon radius ranges from about 5 to 20 microns. Using the automatic estimation the resulting value might very well be much larger or smaller than this range. \li Reverse Phase Encoding Direction: Switch anterior-posterior and posterior-anterior phase encoding. \li Simulate Signal Relaxation: If checked, the relaxation induced signal decay is simulated, other wise the parameters TE, Line Readout Time, Tinhom, and T2 are ignored. \li Disable Partial Volume Effects: If checked, the actual volume fractions of the single compartments are ignored. A voxel will either be filled by the intra axonal compartment completely or will contain no fiber at all. \li Output Additional Images: Output a double image for each compartment. The voxel values correspond to the volume fraction of the respective compartment. Compartment Settings: The group-boxes "Intra-axonal Compartment", "Inter-axonal Compartment" and "Extra-axonal Compartments" allow the specification which model to use and the corresponding model parameters. Currently the following models are implemented: \li Stick: The “stick” model describes diffusion in an idealized cylinder with zero radius. Parameter: Diffusivity d \li Zeppelin: Cylindrically symmetric diffusion tensor. Parameters: Parallel diffusivity d|| and perpendicular diffusivity d \li Tensor: Full diffusion tensor. Parameters: Parallel diffusivity d|| and perpendicular diffusivity constants d⊥1 and d⊥2 \li Ball: Isotropic compartment. Parameter: Diffusivity d \li Astrosticks: Consists of multiple stick models pointing in different directions. The single stick orientations can either be distributed equally over the sphere or are sampled randomly. The model represents signal coming from a type of glial cell called astrocytes, or populations of axons with arbitrary orientation. Parameters: randomization of the stick orientations and diffusivity of the sticks d. \li Dot: Isotropically restricted compartment. No parameter. \li Prototype Signal: EXPERIMENTAL FEATURE!!! The signal is not generated from a parametric model but a prototype signal is sampled from the selected diffusion-weighted image. Parameters: The number of prototype signals that are used for the signal generation (at each fiber position one is picked randomly) and the constraining diffusion parameters for a voxel signal to be included in the list. For a fiber signal one would for example probably select a high FA and for a CSF voxel a low FA. For a detailed description of the individual models, please refer to Panagiotaki et al. "Compartment models of the diffusion MR signal in brain white matter: A taxonomy and comparison". Additionally to the model parameters, each compartment has its own T1 and T2 signal relaxation constants (in ms). This constants are not relevant if the prototype signal model is used, since in this case signal relaxation is disabled. Furthermore, it is possible to specify a volume fraction map for each compartment: \li The volume fraction maps for compartment 1 and 2 (fiber compartments) are optional. If they are not specified, the corresponding volume fractions are directly determined from the fiber bundle. Additionally, it is assumed that in this case all volume fraction maps of the non-fiber compartments contain values relative to the remaining non-fiber volume, not absolute fractions of the complete voxel volume. This ensures that the automatically determined fiber volumes and the map-defined non-fiber volumes sum up to 1 in each voxel. \li If one non-fiber compartment is used but no corresponding volume fraction map is specified, the corresponding volume is automatically set to the remaining volume (voxel volume - fiber volume). \li If four compartments are used, at least one of the extra axonal compartment volume fraction maps has to be specified. The second one can be automatically determined from the respective other (1-f). If this is the case, the non-fiber volume information is again regarded as relative to the available non-fiber volume. Noise and Artifacts: \li Noise: Add Rician or Chi-Square distributed noise with the specified variance to the signal. \li Spikes: Add signal spikes to the k-space signal resulting in stripe artifacts across the corresponding image slice. \li Aliasing: Aliasing artifacts occur if the FOV in phase direction is smaller than the imaged object. The parameter defines the percentage by which the FOV is shrunk. \li N/2 Ghosts: Specify the offset between successive lines in k-space. This offset causes ghost images in distance N/2 in phase direction due to the alternating EPI readout directions. \li Distortions: Simulate distortions due to magnetic field inhomogeneities. This is achieved by adding an additional phase during the readout process. The input is a frequency map specifying the inhomogeneities. The "Fieldmap Generator" view provides an interface to generate simple artificial frequency maps. To egnerate realistic distortions for an in vivo like dataset we recommend using a frequency map acquired during a real MR scan or one estimated with tools such as FSL TOPUP. \li Motion Artifacts: To simulate motion artifacts, the fiber configuration is moved between the signal simulation of the individual gradient volumes. The motion can be performed randomly, where the parameters are used to define the +/- maximum of the corresponding motion, or linearly, where the parameters define the maximum rotation/translation around/along the corresponding axis at the and of the simulated acquisition. \li Eddy Currents: Eddy current induced magnetic field gradient (in mT/m) at the beginning of the k-space readout. A spatially linear eddy current profile in the direction of the respective diffusion-weighting gradient is used. The eddy current induced gradient decays with a time constant τ=70ms. \li Gibbs Ringing: Ringing artifacts occurring on edges in the image due to the frequency low-pass filtering caused by the limited size of the k-space. \imageMacro{FiberfoxExamples.png, "Fig. 3: Examples of artificial crossing (a\,b)\, fanning (c\,d)\, highly curved (e\,f)\, kissing (g\,h) and twisting (i\,j) fibers as well as of the corresponding tensor images generated with Fiberfox.",4} \imageMacro{FiberfoxWholebrain.png, "Fig. 4: Realistic simulation of a whole brain dataset with multiple artifacts.",4} \section QmitkFiberfoxViewUserManualKnownIssues Known Issues \li If a scaling factor is applied to the selcted fiber bundle, the corresponding fiducials are not scaled accordingly. \li In some cases the automatic update of the selected fiber bundle is not triggered even if "Real Time Fibers" is checked, e.g. if a fiducial is deleted. If this happens on can always force an update by pressing the "Generate Fibers" button. If any other issues or feature requests arises during the use of Fiberfox, please don't hesitate to send us an e-mail or directly report the issue in our bugtracker: https://phabricator.mitk.org/maniphest/ \section QmitkFiberfoxViewUserManualReferences References [1] Neher, P.F., Laun, F.B., Stieltjes, B., Maier-Hein, K.H., 2014. Fiberfox: facilitating the creation of realistic white matter software phantoms. Magn Reson Med 72, 1460–1470. doi:10.1002/mrm.25045 [2] Neher, P.F., Laun, F.Neher, P.F., Stieltjes, B., Laun, F.B., Meinzer, H.-P., Fritzsche, K.H., 2013. Fiberfox: A novel tool to generate software phantoms of complex fiber geometries, in: Proceedings of International Society of Magnetic Resonance in Medicine. [3] Neher, P.F., Stieltjes, B., Laun, F.B., Meinzer, H.-P., Fritzsche, K.H., 2013. Fiberfox: A novel tool to generate software phantoms of complex fiber geometries, in: Proceedings of International Society of Magnetic Resonance in Medicine. [4] Hering, J., Neher, P.F., Meinzer, H.-P., Maier-Hein, K.H., 2014. Construction of ground-truth data for head motion correction in diffusion MRI, in: Proceedings of International Society of Magnetic Resonance in Medicine. [5] Maier-Hein, Klaus, Neher, Peter, Houde, Jean-Christophe, Caruyer, Emmanuel, Daducci, Alessandro, Dyrby, Tim, … Descoteaux, Maxime. (2015). Tractography Challenge ISMRM 2015 Data [Data set]. Zenodo. http://doi.org/10.5281/zenodo.572345 [6] Maier-Hein, Klaus, Neher, Peter, Houde, Jean-Christophe, Caruyer, Emmanuel, Daducci, Alessandro, Dyrby, Tim, … Descoteaux, Maxime. (2017). Tractography Challenge ISMRM 2015 High-resolution Data [Data set]. Zenodo. http://doi.org/10.5281/zenodo.579933 */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/Perspectives/QmitkDIAppSyntheticDataGenerationPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/Perspectives/QmitkDIAppSyntheticDataGenerationPerspective.cpp index eb8fe468e4..239c0e8c75 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/Perspectives/QmitkDIAppSyntheticDataGenerationPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/Perspectives/QmitkDIAppSyntheticDataGenerationPerspective.cpp @@ -1,51 +1,49 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkDIAppSyntheticDataGenerationPerspective.h" #include "berryIViewLayout.h" void QmitkDIAppSyntheticDataGenerationPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", - false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", - false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", - berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", - berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// - - left->AddView("org.mitk.views.fiberfoxview"); - left->AddView("org.mitk.views.fieldmapgenerator"); - left->AddView("org.mitk.views.segmentation"); + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// + left->AddView("org.mitk.views.fiberfoxview"); + left->AddView("org.mitk.views.fieldmapgenerator"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFiberfoxViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFiberfoxViewControls.ui index 18726f9332..87d94a0607 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFiberfoxViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFiberfoxViewControls.ui @@ -1,3448 +1,3567 @@ QmitkFiberfoxViewControls 0 0 - 524 - 2652 + 463 + 875 Form Load Parameters :/QmitkDiffusionImaging/general_icons/upload.ico:/QmitkDiffusionImaging/general_icons/upload.ico - - - - 1 + + + + Save Parameters - - - Fiber Definition + + + :/QmitkDiffusionImaging/general_icons/download.ico:/QmitkDiffusionImaging/general_icons/download.ico + + + + + + + + Signal Generation - - - - - Qt::Vertical - - - - 20 - 40 - - - - + + + 25 + - - - color: rgb(255, 0, 0); - - - Please select an image or an existing fiber bundle to draw the fiber fiducials. If you can't provide a suitable image, generate one using the "Signal Generation" tab. - - - Qt::AutoText - - - Qt::AlignJustify|Qt::AlignVCenter - - - true + + + QFrame::NoFrame - - - - - - Fiducial Options + + QFrame::Raised - - - - - All fiducials are treated as circles with the same radius as the first fiducial. - - - Use Constant Fiducial Radius - - - false - - - + + + 0 + + + 0 + + + 0 + + + 0 + - + - false + true - Align selected fiducials with voxel grid. Shifts selected fiducials to nearest voxel center. + <html><head/><body><p>Start DWI generation from selected fiber bundle.</p><p>If no fiber bundle but an existing diffusion weighted image is selected, the enabled artifacts are added to this image.</p><p>If neither a fiber bundle nor a diffusion weighted image is selected, a grayscale image containing a simple gradient is generated.</p></body></html> - Align With Grid + Start Simulation :/QmitkDiffusionImaging/general_icons/right.ico:/QmitkDiffusionImaging/general_icons/right.ico - - - - - - - Operations - - - - - - false - - - Join Bundles - - - - :/QmitkDiffusionImaging/general_icons/plus.ico:/QmitkDiffusionImaging/general_icons/plus.ico - - - - - - - QFrame::NoFrame - - - QFrame::Raised + + + + Input Data - + 0 0 0 0 - - - - - - - - - - - - - Y + + + + QFrame::NoFrame - - false + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + - + + + + + + + ... + + + + - - + + - Rotation angle (in degree) around x-axis. - - - 3 - - - -360.000000000000000 + <html><head/><body><p>Select a binary image to define the area of signal generation. Outside of the mask image only noise will be actively generated.</p></body></html> - - 360.000000000000000 - - - 0.100000000000000 + + QComboBox::AdjustToMinimumContentsLength - - + + - Axis: + Fiber Bundle: false - - - - Rotation angle (in degree) around y-axis. - - - 3 - - - -360.000000000000000 - - - 360.000000000000000 - - - 0.100000000000000 - - - - - + + - Translation: + Save path: false - - - - Translation (in mm) in direction of the z-axis. - - - 3 - - - -1000.000000000000000 - - - 1000.000000000000000 - - - 0.100000000000000 - - - - - - - Translation (in mm) in direction of the y-axis. - - - 3 - - - -1000.000000000000000 - - - 1000.000000000000000 - - - 0.100000000000000 - - - - - + + - X + Tissue Mask: false - - + + + + <html><head/><body><p>Select a fiber bundle to generate the white matter signal from. You can either use the fiber definition tab to manually define an input fiber bundle or you can also use any existing bundle, e.g. yielded by a tractography algorithm.</p></body></html> + + + QComboBox::AdjustToMinimumContentsLength + + + + + - Rotation: + Template Image: false - - - - - - - - - - - - - Z - - - false - - - - - - - Rotation angle (in degree) around z-axis. - - - 3 - - - -360.000000000000000 - - - 360.000000000000000 - - - 0.100000000000000 - - - - - - - Translation (in mm) in direction of the x-axis. - - - 3 - - - -1000.000000000000000 - - - 1000.000000000000000 - - - 0.100000000000000 - - - - - - - - - - - - - - - - Scaling: - - - false - - - - - - - Scaling factor for selected fiber bundle along the x-axis. - - - 0.010000000000000 - - - 10.000000000000000 - - - 0.010000000000000 - - - 1.000000000000000 - - - - - - - Scaling factor for selected fiber bundle along the y-axis. - - - 0.010000000000000 - - - 10.000000000000000 - - - 0.010000000000000 - - - 1.000000000000000 - - - - - + + - Scaling factor for selected fiber bundle along the z-axis. - - - 0.010000000000000 + <html><head/><body><p>The parameters for the simulation (e.g. spacing, size, diffuison-weighted gradients, b-value) are adopted from this image.</p></body></html> - - 10.000000000000000 - - - 0.010000000000000 - - - 1.000000000000000 + + QComboBox::AdjustToMinimumContentsLength - - + + - false - - - Copy Bundles - - - - :/QmitkDiffusionImaging/general_icons/copy2.ico:/QmitkDiffusionImaging/general_icons/copy2.ico + true - - - - - - false + + Stop current simulation. - Transform Selection + Abort Simulation - :/QmitkDiffusionImaging/general_icons/refresh.ico:/QmitkDiffusionImaging/general_icons/refresh.ico + :/QmitkDiffusionImaging/general_icons/abort.ico:/QmitkDiffusionImaging/general_icons/abort.ico - - - - If checked, the fiducials belonging to the modified bundle are also modified. - - - Include Fiducials - - + + + + + Courier + 7 + + + true - - + + - Fiber Options + Extra-axonal Compartments - - - + + + 0 + + + 0 + + + 0 + + + 0 + + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - - - QFrame::NoFrame + + + + Volume Fraction: - - QFrame::Raised + + + + + + - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - Tension: - - - false - - - - - - - - - - - - - - - - Fiber Sampling: - - - false - - - - - - - - - - 3 - - - -1.000000000000000 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.000000000000000 - - - - - - - 3 - - - -1.000000000000000 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.000000000000000 - - - - - - - - - - - - - - - - Bias: - - - false - - - - - - - - - - - - - - - - Continuity: - - - false - - - - - - - 3 - - - -1.000000000000000 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.000000000000000 - - - - - - - Distance of fiber sampling points (in mm) - - - 1 - - - 0.100000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 6 - - - - - - - - - - - - - - #Fibers: - - - false - - - - - - - Specify number of fibers to generate for the selected bundle. - - - 1 - - - 1000000 - - - 100 - - - 100 - - - - - - - - false - - - Generate Fibers + + + + Select signal model for extra-axonal compartment. - - - :/QmitkDiffusionImaging/general_icons/right.ico:/QmitkDiffusionImaging/general_icons/right.ico + + + Ball Model + + + + + Astrosticks Model + + + + + Dot Model + + + + + Prototype Signal + + + + + + + + + + + + + + + + + + + + Qt::Horizontal - - + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - - - Select fiber distribution inside of the fiducials. + + + + Volume Fraction: - - - Uniform - - - - - Gaussian - - - - - - - - - - - - - - - Fiber Distribution: - - - false - - - - - + + - Variance of the gaussian - - - 3 - - - 0.001000000000000 - - - 10.000000000000000 - - - 0.010000000000000 - - - 0.100000000000000 + Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. + + + + + + + + + + + + + Select signal model for extra-axonal compartment. + + + + -- + + + + + Ball Model + + + + + Astrosticks Model + + + + + Dot Model + + + + + Prototype Signal + + + + + + + + + + + + + + Intra-axonal Compartment + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + - + + + Select signal model for intra-axonal compartment. + + + + Stick Model + + + + + Zeppelin Model + + + + + Tensor Model + + + + + Prototype Signal + + + + + + + + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - - Disable to only generate fibers if "Generate Fibers" button is pressed. - + - Real Time Fibers - - - true + Volume Fraction: - + - Disable to only generate fibers if "Generate Fibers" button is pressed. - - - Advanced Options - - - false + Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. - - - - QFrame::NoFrame - - - QFrame::Raised + + + + Image Settings - + 0 0 0 0 - - - - false - - - - 30 - 30 - - - - Draw elliptical fiducial. - + + - - - - - :/QmitkDiffusionImaging/circle.png:/QmitkDiffusionImaging/circle.png - - - - 32 - 32 - - - - false - - - true + Advanced Options - - - - false - - - - 30 - 30 - - - - Flip fiber waypoints of selcted fiducial around one axis. - - - - - - - :/QmitkDiffusionImaging/general_icons/refresh.ico:/QmitkDiffusionImaging/general_icons/refresh.ico - - - - 32 - 32 - - - - false + + + + QFrame::NoFrame - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Signal Generation - - - - - - Extra-axonal Compartments - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Volume Fraction: - - - - - - - - - - - - - - - - - Select signal model for extra-axonal compartment. - - - - Ball Model - - - - - Astrosticks Model - - - - - Dot Model - - - - - Prototype Signal - - - - - - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Volume Fraction: - - - - - - - Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. - - - - - - - - - - - - - - - - - - - Select signal model for extra-axonal compartment. - - - - -- - - - - - Ball Model - - - - - Astrosticks Model - - - - - Dot Model - - - - - Prototype Signal - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Image Settings - - - - - - Advanced Options - - - - - - - QFrame::NoFrame - - - QFrame::Raised + + QFrame::Raised 0 0 0 0 6 Gradient Directions: Number of gradient directions distributed over the half sphere. 0 10000 1 30 <html><head/><body><p>b-Value<span style=" font-style:italic;"> [s/mm</span><span style=" font-style:italic; vertical-align:super;">2</span><span style=" font-style:italic;">]</span>:</p></body></html> false b-value in s/mm² 0 10000 100 1000 color: rgb(255, 0, 0); Using geometry of selected image! color: rgb(255, 0, 0); Using gradients of selected DWI! QFrame::NoFrame QFrame::Raised 0 0 0 0 6 <html><head/><body><p>Number of Channels:</p></body></html> false TR in milliseconds 1 999999999 1 4000 Output one image per compartment containing the corresponding volume fractions per voxel. Reverse Phase Encoding Direction false Signal Scale: Dwell time (time to read one line in k-space) in ms. 100.000000000000000 0.100000000000000 1.000000000000000 TE in milliseconds 1 999999999 1 100 Fiber Radius: Partial Fourier: false Disable partial volume. Treat voxel content as fiber-only if at least one fiber is present. Disable Partial Volume Effects false <html><head/><body><p>Coil Sensitivity:</p></body></html> false Partial fourier factor (0.5-1) 3 0.500000000000000 1.000000000000000 0.100000000000000 1.000000000000000 Output phase image and volume fraction maps. Output Additional Images false Relaxation time due to magnetic field inhomogeneities (T2', in milliseconds). 1 10000 1 50 <html><head/><body><p>Repetition Time <span style=" font-style:italic;">TR</span>: </p></body></html> false Constant Linear Exponential Dwell Time: false <html><head/><body><p><span style=" font-style:italic;">T</span><span style=" font-style:italic; vertical-align:sub;">inhom</span> Relaxation: </p></body></html> false <html><head/><body><p><span style=" font-style:italic;">TE</span>, <span style=" font-style:italic;">T</span><span style=" font-style:italic; vertical-align:sub;">inhom</span> and <span style=" font-style:italic;">T2</span> will have no effect if unchecked.</p></body></html> Simulate Signal Relaxation true <html><head/><body><p>Echo Time <span style=" font-style:italic;">TE</span>: </p></body></html> false TE in milliseconds 1 10000 1 100 Number of coil elements used for the acquisiton. 1 128 1 1 Acquisition Type: Single Shot EPI Spin Echo Fiber radius used to calculate volume fractions (in µm). Set to 0 for automatic radius estimation. 9999.000000000000000 - - + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 3 + + + 0.100000000000000 + + + 50.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + + Image Spacing: + + + + + + + 3 + + + 0.100000000000000 + + + 50.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + + 3 + + + 0.100000000000000 + + + 50.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + + Image Dimensions: + + + + + + + Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. + + + 1 + + + 1000 + + + 1 + + + 20 + + + + + + + Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. + + + 1 + + + 1000 + + + 1 + + + 20 + + + + + + + Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. + + + 1 + + + 1000 + + + 1 + + + 3 + + + + + + + + + + + + + Inter-axonal Compartment + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Select signal model for intra-axonal compartment. + + + + -- + + + + + Stick Model + + + + + Zeppelin Model + + + + + Tensor Model + + + + + + + + + + + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Volume Fraction: + + + + + + + Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. + + + + + + + + + + + + + Noise and other Artifacts + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Add Distortions + + + false + + + + + + + Add Spikes + + + false + + + + + + + true + + + QFrame::NoFrame + + + QFrame::Raised + + + + QFormLayout::AllNonFixedFieldsGrow + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + Gradient: + + + false + + + + + + + Eddy current induced magnetic field gradient (in mT/m). + + + 4 + + + 1000.000000000000000 + + + 0.001000000000000 + + + 0.010000000000000 + + + + + + + + + + Add Motion Artifacts + + + false + + + + + + + Qt::Horizontal + + + + + + + true + + + QFrame::NoFrame + + + QFrame::Raised + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + K-Space Line Offset: + + + false + + + + + + + A larger offset increases the inensity of the ghost image. + + + 3 + + + 1.000000000000000 + + + 0.010000000000000 + + + 0.250000000000000 + + + + + + + + + + Add Noise + + + false + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Num. Spikes: + + + + + + + The number of randomly occurring signal spikes. + + + 1 + + + + + + + Spike amplitude relative to the largest signal amplitude of the corresponding k-space slice. + + + 0.100000000000000 + + + 0.100000000000000 + + + + + + + Scale: + + + + + + + + + + true + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 6 + + + 0 + + + 0 + + + 6 + + + + + Toggle between random movement and linear movement. + + + Randomize motion + + + true + + + + + + + Rotation + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + + + + + Degree: + + + false + + + + + + + + + + + + + + + + x + + + false + + + + + + + + + + + + + + + + Axis: + + + false + + + + + + + Maximum rotation around x-axis. + + + 1 + + + -360.000000000000000 + + + 360.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + Maximum rotation around z-axis. + + + 1 + + + -360.000000000000000 + + + 360.000000000000000 + + + 1.000000000000000 + + + 15.000000000000000 + + + + + + + + + + + + + + + + y + + + false + + + + + + + + + + + + + + + + z + + + false + + + + + + + Maximum rotation around y-axis. + + + 1 + + + -360.000000000000000 + + + 360.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + + + + Translation + + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + + Distance: + + + false + + + + + + + + + + + + + + + + x + + + false + + + + + + + + + + + + + + + + y + + + false + + + + + + + + + + + + + + + + Axis: + + + false + + + + + + + + + + + + + + + + z + + + false + + + + + + + Maximum translation along x-axis. + + + 1 + + + -1000.000000000000000 + + + 1000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + Maximum translation along y-axis. + + + 1 + + + -1000.000000000000000 + + + 1000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + Maximum translation along z-axis. + + + 1 + + + -1000.000000000000000 + + + 1000.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Motion volumes: + + + + + + + Type in the volume indices that should be affected by motion (e.g. "0 3 7" whithout quotation marks). Leave blank for motion in all volumes. Type in "random" to randomly select volumes for motion. A list of negative numbers (e.g. -1 -2 -3) excludes volumes (e.g. 1 2 3) selects all remaining volumes. + + + random + + + + + + + + + + + + + Add ringing artifacts occuring at strong edges in the image. + + + Add Gibbs Ringing + + + false + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Add N/2 Ghosts + + + false + + + + + + + Add Aliasing + + + false + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + + + + Add Eddy Current Effects + + + false + + + + + + + true + QFrame::NoFrame QFrame::Raised - + + + 6 + 0 0 0 0 - - - - 3 - - - 0.100000000000000 - - - 50.000000000000000 - - - 0.100000000000000 - - - 2.000000000000000 - - - - - - - Image Spacing: - - - - - - - 3 - - - 0.100000000000000 - - - 50.000000000000000 - - - 0.100000000000000 - - - 2.000000000000000 - - - - - - - 3 - - - 0.100000000000000 - - - 50.000000000000000 - - - 0.100000000000000 - - - 2.000000000000000 - - - - - - Image Dimensions: - - - - - + - Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. + - - 1 + + - - 1000 + + - - 1 + + Shrink FOV (%): - - 20 + + false - - + + - Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. - - - 1 - - - 1000 + Shrink FOV by this percentage. - + 1 - - 20 - - - - - - - Fiber sampling factor which determines the accuracy of the calculated fiber and non-fiber volume fractions. - - 1 + 0.000000000000000 - 1000 + 90.000000000000000 - 1 + 0.100000000000000 - 3 + 25.000000000000000 - - - - - - - - - - Inter-axonal Compartment - - - - - - Select signal model for intra-axonal compartment. - - - - -- - - - - - Stick Model - - - - - Zeppelin Model - - - - - Tensor Model - - - - - - - - - - - - - - - + + - - + + + + true + QFrame::NoFrame QFrame::Raised - + + + 6 + 0 0 0 0 - + + + + + + + + + + - Volume Fraction: + Frequency Map: + + + false - + - Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. + Select image specifying the frequency inhomogeneities (in Hz). - - - - - - - true - - - Stop current simulation. - - - Abort Simulation - - - - :/QmitkDiffusionImaging/general_icons/abort.ico:/QmitkDiffusionImaging/general_icons/abort.ico - - - - - - - Data - - - - + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - 0 - + + + + Variance: + + + + + + + Variance of selected noise distribution. + + + 10 + + + 0.000000000000000 + + + 999999999.000000000000000 + + + 0.001000000000000 + + + 50.000000000000000 + + + - + - - + Distribution: - - - ... + + + Noise distribution + + + Complex Gaussian + + + + + Rician + + - - - - <html><head/><body><p>Select a binary image to define the area of signal generation. Outside of the mask image only noise will be actively generated.</p></body></html> - - - QComboBox::AdjustToMinimumContentsLength - - - - - - - - - - - - - - - - Fiber Bundle: - - - false - - - - - + + + + + + + + Fiber Definition + + + + 25 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + color: rgb(255, 0, 0); + + + Please select an image or an existing fiber bundle to draw the fiber fiducials. If you can't provide a suitable image, generate one using the "Signal Generation" tab. + + + Qt::AutoText + + + Qt::AlignJustify|Qt::AlignVCenter + + + true + + + + + + + Fiducial Options + + + + 0 + + + 0 + + + 0 + + + 0 + + + - - - - - - - + All fiducials are treated as circles with the same radius as the first fiducial. - Save path: + Use Constant Fiducial Radius - + false - - - - - - - - - - - - - Tissue Mask: - - + + + false - - - - - - <html><head/><body><p>Select a fiber bundle to generate the white matter signal from. You can either use the fiber definition tab to manually define an input fiber bundle or you can also use any existing bundle, e.g. yielded by a tractography algorithm.</p></body></html> - - - QComboBox::AdjustToMinimumContentsLength - - - - - - - - - - - - + Align selected fiducials with voxel grid. Shifts selected fiducials to nearest voxel center. - Template Image: - - - false - - - - - - - <html><head/><body><p>The parameters for the simulation (e.g. spacing, size, diffuison-weighted gradients, b-value) are adopted from this image.</p></body></html> + Align With Grid - - QComboBox::AdjustToMinimumContentsLength + + + :/QmitkDiffusionImaging/general_icons/right.ico:/QmitkDiffusionImaging/general_icons/right.ico - - - - - Courier - 7 - - - - true - - - - - + + - Noise and other Artifacts + Operations - - - - - Add Distortions - - + + + 0 + + + 0 + + + 0 + + + 0 + + + + false - - - - - Add Spikes + Join Bundles - - false + + + :/QmitkDiffusionImaging/general_icons/plus.ico:/QmitkDiffusionImaging/general_icons/plus.ico - - - - true - + + QFrame::NoFrame QFrame::Raised - - - QFormLayout::AllNonFixedFieldsGrow - - - 6 - + 0 0 0 0 - - + + - Gradient: + Y false - - + + - Eddy current induced magnetic field gradient (in mT/m). + Rotation angle (in degree) around x-axis. - 4 + 3 + + + -360.000000000000000 + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + + + + + + + Axis: + + + false + + + + + + + Rotation angle (in degree) around y-axis. + + + 3 + + + -360.000000000000000 + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + + + + + + + + + + Translation: + + + false + + + + + + + Translation (in mm) in direction of the z-axis. + + + 3 + + + -1000.000000000000000 1000.000000000000000 - 0.001000000000000 + 0.100000000000000 - - 0.010000000000000 + + + + + + Translation (in mm) in direction of the y-axis. + + + 3 + + + -1000.000000000000000 + + + 1000.000000000000000 + + + 0.100000000000000 - - - - - - - Add Motion Artifacts - - - false - - - - - - - Qt::Horizontal - - - - - - - true - - - QFrame::NoFrame - - - QFrame::Raised - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - + + + + + + + + + + + + + X + + + false + + + + + + + + + + + + + + + + Rotation: + + + false + + + + + + + + + + + + + + + + Z + + + false + + + + + + + Rotation angle (in degree) around z-axis. + + + 3 + + + -360.000000000000000 + + + 360.000000000000000 + + + 0.100000000000000 + + + + + + + Translation (in mm) in direction of the x-axis. + + + 3 + + + -1000.000000000000000 + + + 1000.000000000000000 + + + 0.100000000000000 + + + + + - K-Space Line Offset: + Scaling: false - - + + - A larger offset increases the inensity of the ghost image. + Scaling factor for selected fiber bundle along the x-axis. - - 3 + + 0.010000000000000 - 1.000000000000000 + 10.000000000000000 0.010000000000000 - 0.250000000000000 - - - - - - - - - - Add Noise - - - false - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Num. Spikes: + 1.000000000000000 - - + + - The number of randomly occurring signal spikes. + Scaling factor for selected fiber bundle along the y-axis. + + + 0.010000000000000 + + + 10.000000000000000 + + + 0.010000000000000 - 1 + 1.000000000000000 - - + + - Spike amplitude relative to the largest signal amplitude of the corresponding k-space slice. + Scaling factor for selected fiber bundle along the z-axis. + + + 0.010000000000000 + + + 10.000000000000000 - 0.100000000000000 + 0.010000000000000 - 0.100000000000000 - - - - - - - Scale: + 1.000000000000000 - - + + + + false + + + Copy Bundles + + + + :/QmitkDiffusionImaging/general_icons/copy2.ico:/QmitkDiffusionImaging/general_icons/copy2.ico + + + + + + false + + + Transform Selection + + + + :/QmitkDiffusionImaging/general_icons/refresh.ico:/QmitkDiffusionImaging/general_icons/refresh.ico + + + + + + + If checked, the fiducials belonging to the modified bundle are also modified. + + + Include Fiducials + + true + + + + + + + + + Fiber Options + + + + 0 + + + 0 + + + 0 + + + 0 + + + QFrame::NoFrame QFrame::Raised - + 0 - 6 + 0 0 0 - - 6 - - - - - Toggle between random movement and linear movement. - - - Randomize motion - - - true - - - - - - - Rotation + + + + QFrame::NoFrame - - - 0 - - - 9 - - - 0 - - - 0 - - - - - - - - - - - - - - Degree: - - - false - - - - - + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + - x + Tension: false - + - Axis: + Fiber Sampling: false - + - Maximum rotation around x-axis. + - 1 + 3 - -360.000000000000000 + -1.000000000000000 - 360.000000000000000 + 1.000000000000000 - 1.000000000000000 + 0.100000000000000 0.000000000000000 - - - - Maximum rotation around z-axis. - + + - 1 + 3 - -360.000000000000000 + -1.000000000000000 - 360.000000000000000 - - 1.000000000000000 - - 15.000000000000000 - - - - - - - - - - - - - - - - y - - - false - - - - - - - - - - - - - - - - z - - - false - - - - - - - Maximum rotation around y-axis. - - - 1 - - - -360.000000000000000 - - - 360.000000000000000 - - 1.000000000000000 + 0.100000000000000 0.000000000000000 - - - - - - - Translation - - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - - Distance: - - - false - - - - - - - - - - - - - - - - x - - - false - - - - - - - - - - - - - - - - y - - - false - - - - - + + - Axis: + Bias: false - - + + - z + Continuity: false - - - - Maximum translation along x-axis. - + + - 1 + 3 - -1000.000000000000000 + -1.000000000000000 - 1000.000000000000000 - - 1.000000000000000 - - 0.000000000000000 - - - - - - - Maximum translation along y-axis. - - - 1 - - - -1000.000000000000000 - - - 1000.000000000000000 - - 1.000000000000000 + 0.100000000000000 0.000000000000000 - - + + - Maximum translation along z-axis. + Distance of fiber sampling points (in mm) 1 - -1000.000000000000000 - - - 1000.000000000000000 + 0.100000000000000 - 1.000000000000000 + 0.100000000000000 - 0.000000000000000 + 1.000000000000000 - - + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 + + 6 + - + + + + + + + + + + - Motion volumes: + #Fibers: + + + false - + - Type in the volume indices that should be affected by motion (e.g. "0 3 7" whithout quotation marks). Leave blank for motion in all volumes. Type in "random" to randomly select volumes for motion. A list of negative numbers (e.g. -1 -2 -3) excludes volumes (e.g. 1 2 3) selects all remaining volumes. + Specify number of fibers to generate for the selected bundle. - - random + + 1 + + + 1000000 + + + 100 + + + 100 - - - - Add ringing artifacts occuring at strong edges in the image. - - - Add Gibbs Ringing - - - false - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - Add N/2 Ghosts - - - false - - - - - - - Add Aliasing - - + + + false - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - - - Add Eddy Current Effects + Generate Fibers - - false + + + :/QmitkDiffusionImaging/general_icons/right.ico:/QmitkDiffusionImaging/general_icons/right.ico - - - - true - + + QFrame::NoFrame QFrame::Raised - - - 6 - + 0 0 0 0 - - - - - - - - - - - - - Shrink FOV (%): - - - false - - - - + - Shrink FOV by this percentage. - - - 1 - - - 0.000000000000000 - - - 90.000000000000000 - - - 0.100000000000000 - - - 25.000000000000000 + Select fiber distribution inside of the fiducials. + + + Uniform + + + + + Gaussian + + - - - - - - - true - - - QFrame::NoFrame - - - QFrame::Raised - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - + - - - - - - - Frequency Map: - - - false - - - - - - - Select image specifying the frequency inhomogeneities (in Hz). - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - + + + + + - Variance: + Fiber Distribution: + + + false - - + + - Variance of selected noise distribution. + Variance of the gaussian - 10 + 3 - 0.000000000000000 + 0.001000000000000 - 999999999.000000000000000 + 10.000000000000000 - 0.001000000000000 + 0.010000000000000 - 50.000000000000000 - - - - - - - Distribution: - - - - - - - Noise distribution + 0.100000000000000 - - - Complex Gaussian - - - - - Rician - - - - - - - - - true - - - <html><head/><body><p>Start DWI generation from selected fiber bundle.</p><p>If no fiber bundle but an existing diffusion weighted image is selected, the enabled artifacts are added to this image.</p><p>If neither a fiber bundle nor a diffusion weighted image is selected, a grayscale image containing a simple gradient is generated.</p></body></html> - - - Start Simulation - - - - :/QmitkDiffusionImaging/general_icons/right.ico:/QmitkDiffusionImaging/general_icons/right.ico - - - - - - - Intra-axonal Compartment - - - - - - - - - - - - - - Select signal model for intra-axonal compartment. - - - - Stick Model - - - - - Zeppelin Model - - - - - Tensor Model - - - - - Prototype Signal - - - - - - - - - + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - + + + Disable to only generate fibers if "Generate Fibers" button is pressed. + - Volume Fraction: + Real Time Fibers + + + true - + - Optional! If no volume fraction map for this compartment is set, the corresponding volume fractions are calculated from the input fibers. + Disable to only generate fibers if "Generate Fibers" button is pressed. + + + Advanced Options + + + false + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + false + + + + 30 + 30 + + + + Draw elliptical fiducial. + + + + + + + :/QmitkDiffusionImaging/circle.png:/QmitkDiffusionImaging/circle.png + + + + 32 + 32 + + + + false + + + true + + + + + + + false + + + + 30 + 30 + + + + Flip fiber waypoints of selcted fiducial around one axis. + + + + + + + :/QmitkDiffusionImaging/general_icons/refresh.ico:/QmitkDiffusionImaging/general_icons/refresh.ico + + + + 32 + 32 + + + + false + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + - - - - Save Parameters - - - - :/QmitkDiffusionImaging/general_icons/download.ico:/QmitkDiffusionImaging/general_icons/download.ico - - - - QmitkDataStorageComboBoxWithSelectNone + QmitkDataStorageComboBox QComboBox -
QmitkDataStorageComboBoxWithSelectNone.h
+
QmitkDataStorageComboBox.h
- QmitkDataStorageComboBox + QmitkDataStorageComboBoxWithSelectNone QComboBox -
QmitkDataStorageComboBox.h
+
QmitkDataStorageComboBoxWithSelectNone.h
QmitkTensorModelParametersWidget QWidget
QmitkTensorModelParametersWidget.h
1
QmitkStickModelParametersWidget QWidget
QmitkStickModelParametersWidget.h
1
QmitkZeppelinModelParametersWidget QWidget
QmitkZeppelinModelParametersWidget.h
1
QmitkBallModelParametersWidget QWidget
QmitkBallModelParametersWidget.h
1
QmitkAstrosticksModelParametersWidget QWidget
QmitkAstrosticksModelParametersWidget.h
1
QmitkDotModelParametersWidget QWidget
QmitkDotModelParametersWidget.h
1
QmitkPrototypeSignalParametersWidget QWidget
QmitkPrototypeSignalParametersWidget.h
1
m_CircleButton m_FlipButton m_RealTimeFibers m_AdvancedOptionsBox m_DistributionBox m_VarianceBox m_FiberDensityBox m_FiberSamplingBox m_TensionBox m_ContinuityBox m_BiasBox m_GenerateFibersButton m_ConstantRadiusBox m_AlignOnGrid m_XrotBox m_YrotBox m_ZrotBox m_XtransBox m_YtransBox m_ZtransBox m_XscaleBox m_YscaleBox m_ZscaleBox m_TransformBundlesButton m_CopyBundlesButton m_JoinBundlesButton m_IncludeFiducials m_FiberBundleComboBox m_MaskComboBox m_TemplateComboBox m_SavePathEdit m_OutputPathButton - m_GenerateImageButton - m_AbortSimulationButton - m_SimulationStatusText m_SizeX m_SizeY m_SizeZ m_SpacingX m_SpacingY m_SpacingZ m_NumGradientsBox m_BvalueBox m_AdvancedOptionsBox_2 m_SignalScaleBox m_TEbox m_TRbox m_LineReadoutTimeBox m_PartialFourier m_T2starBox m_FiberRadius m_ReversePhaseBox m_RelaxationBox m_EnforcePureFiberVoxelsBox m_VolumeFractionsBox m_Compartment1Box m_Comp1VolumeFraction m_Compartment2Box m_Comp2VolumeFraction m_Compartment3Box m_Comp3VolumeFraction m_Compartment4Box m_Comp4VolumeFraction m_AddNoise m_NoiseDistributionBox m_NoiseLevel m_AddSpikes m_SpikeNumBox m_SpikeScaleBox m_AddGhosts m_kOffsetBox m_AddAliasing m_WrapBox m_AddDistortions m_FrequencyMapBox m_AddMotion m_RandomMotion m_MaxRotationBoxX m_MaxRotationBoxY m_MaxRotationBoxZ m_MaxTranslationBoxX m_MaxTranslationBoxY m_MaxTranslationBoxZ m_AddEddy m_EddyGradientStrength m_AddGibbsRinging m_SaveParametersButton m_LoadParametersButton - tabWidget + toolBox
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.cpp index fb4d79c51c..5a50e4ff51 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.cpp @@ -1,310 +1,274 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ // Blueberry #include #include // MITK #include "QmitkFieldmapGeneratorView.h" #include #include #include #include #include #include const std::string QmitkFieldmapGeneratorView::VIEW_ID = "org.mitk.views.fieldmapgenerator"; QmitkFieldmapGeneratorView::QmitkFieldmapGeneratorView() : QmitkAbstractView() , m_Controls( 0 ) { } QmitkFieldmapGeneratorView::~QmitkFieldmapGeneratorView() { } void QmitkFieldmapGeneratorView::CreateQtPartControl( QWidget *parent ) { // build up qt view, unless already done if ( !m_Controls ) { // create GUI widgets from the Qt Designer's .ui file m_Controls = new Ui::QmitkFieldmapGeneratorViewControls; m_Controls->setupUi( parent ); m_Controls->m_SelectedImageBox->SetDataStorage(this->GetDataStorage()); mitk::TNodePredicateDataType::Pointer isMitkImage = mitk::TNodePredicateDataType::New(); m_Controls->m_SelectedImageBox->SetPredicate(isMitkImage); + m_SliceChangeListener.RenderWindowPartActivated(this->GetRenderWindowPart()); + connect(&m_SliceChangeListener, SIGNAL(SliceChanged()), this, SLOT(OnSliceChanged())); + connect((QObject*) m_Controls->m_GenerateFieldmap, SIGNAL(clicked()), (QObject*) this, SLOT(GenerateFieldmap())); connect((QObject*) m_Controls->m_PlaceFieldSource, SIGNAL(clicked()), (QObject*) this, SLOT(PlaceFieldSource())); connect((QObject*) m_Controls->m_SourceVarianceBox, SIGNAL(valueChanged(double)), (QObject*) this, SLOT(OnVarianceChanged(double))); connect((QObject*) m_Controls->m_SourceHeightBox, SIGNAL(valueChanged(double)), (QObject*) this, SLOT(OnHeightChanged(double))); } } void QmitkFieldmapGeneratorView::SetFocus() { m_Controls->m_SelectedImageBox->setFocus(); } void QmitkFieldmapGeneratorView::OnVarianceChanged(double value) { if (m_SelectedSource.IsNotNull()) { m_SelectedSource->SetProperty("pointsize", mitk::FloatProperty::New(value)); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } } void QmitkFieldmapGeneratorView::OnHeightChanged(double value) { if (m_SelectedSource.IsNotNull()) { m_SelectedSource->SetProperty("color", mitk::ColorProperty::New(0, 0, value/100.0)); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } } void QmitkFieldmapGeneratorView::PlaceFieldSource() { if (m_Controls->m_SelectedImageBox->GetSelectedNode().IsNull() || !this->GetRenderWindowPart()) { m_Controls->m_WorldPosLabel->setText("-"); m_Controls->m_IndexLabel->setText("-"); return; } mitk::Point3D index; mitk::Image::Pointer img = dynamic_cast(m_Controls->m_SelectedImageBox->GetSelectedNode()->GetData()); mitk::BaseGeometry* geom = img->GetGeometry(); if ( geom->IsInside(m_WorldPoint) ) { img->GetGeometry()->WorldToIndex(m_WorldPoint, index); mitk::PointSet::Pointer pointSet = mitk::PointSet::New(); pointSet->InsertPoint(0, m_WorldPoint); mitk::DataStorage::SetOfObjects::ConstPointer children = GetDataStorage()->GetDerivations(m_Controls->m_SelectedImageBox->GetSelectedNode()); mitk::DataNode::Pointer node = mitk::DataNode::New(); node->SetData(pointSet); QString name = QString("FieldSource_%1").arg(children->size()); node->SetName(name.toStdString()); node->SetVisibility(true); float minSpacing; if(geom->GetSpacing()[0]GetSpacing()[1] && geom->GetSpacing()[0]GetSpacing()[2]) minSpacing = geom->GetSpacing()[0]; else if (geom->GetSpacing()[1] < geom->GetSpacing()[2]) minSpacing = geom->GetSpacing()[1]; else minSpacing = geom->GetSpacing()[2]; node->SetProperty("pointsize", mitk::FloatProperty::New(minSpacing*5)); node->SetProperty("color", mitk::ColorProperty::New(0, 0, 1)); GetDataStorage()->Add(node, m_Controls->m_SelectedImageBox->GetSelectedNode()); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } } void QmitkFieldmapGeneratorView::GenerateFieldmap() { if (m_Controls->m_SelectedImageBox->GetSelectedNode().IsNull()) return; mitk::Image::Pointer img = dynamic_cast(m_Controls->m_SelectedImageBox->GetSelectedNode()->GetData()); mitk::BaseGeometry* geom = img->GetGeometry(); typedef itk::Image< double, 3 > FieldMapType; itk::Vector spacing; ///< output image spacing mitk::Point3D origin; ///< output image origin itk::FieldmapGeneratorFilter< FieldMapType >::MatrixType directionMatrix; ///< output image rotation itk::FieldmapGeneratorFilter< FieldMapType >::OutputImageRegionType imageRegion; ///< output image size spacing = geom->GetSpacing(); origin = geom->GetOrigin(); imageRegion.SetSize(0, img->GetDimension(0)); imageRegion.SetSize(1, img->GetDimension(1)); imageRegion.SetSize(2, img->GetDimension(2)); for (int r=0; r<3; r++) for (int c=0; c<3; c++) directionMatrix[r][c]=geom->GetMatrixColumn(c)[r]/spacing[c]; std::vector< double > variances; std::vector< double > heights; std::vector< mitk::Point3D > worldPositions; mitk::DataStorage::SetOfObjects::ConstPointer children = GetDataStorage()->GetDerivations(m_Controls->m_SelectedImageBox->GetSelectedNode()); for( mitk::DataStorage::SetOfObjects::const_iterator it = children->begin(); it != children->end(); ++it ) if(dynamic_cast((*it)->GetData())) { float var = 0; (*it)->GetPropertyValue("pointsize", var); variances.push_back(var); float color[3]; (*it)->GetColor(color); heights.push_back(color[2]*100); mitk::PointSet* ps = dynamic_cast((*it)->GetData()); mitk::Point3D point; ps->GetPointIfExists(0, &point); worldPositions.push_back(point); } vnl_vector_fixed< double, 3 > gradient, offset; gradient[0] = m_Controls->m_xGradientBox->value(); gradient[1] = m_Controls->m_yGradientBox->value(); gradient[2] = m_Controls->m_zGradientBox->value(); offset[0] = m_Controls->m_xOffsetBox->value(); offset[1] = m_Controls->m_yOffsetBox->value(); offset[2] = m_Controls->m_zOffsetBox->value(); itk::FieldmapGeneratorFilter< FieldMapType >::Pointer filter = itk::FieldmapGeneratorFilter< FieldMapType >::New(); filter->SetHeights(heights); filter->SetVariances(variances); filter->SetWorldPositions(worldPositions); filter->SetSpacing(spacing); filter->SetOrigin(origin); filter->SetDirectionMatrix(directionMatrix); filter->SetImageRegion(imageRegion); filter->SetGradient(gradient); filter->SetOffset(offset); filter->Update(); mitk::DataNode::Pointer resultNode = mitk::DataNode::New(); mitk::Image::Pointer image = mitk::Image::New(); image->InitializeByItk(filter->GetOutput(0)); image->SetVolume(filter->GetOutput(0)->GetBufferPointer()); resultNode->SetData( image ); resultNode->SetName(m_Controls->m_SelectedImageBox->GetSelectedNode()->GetName()+"_Fieldmap"); GetDataStorage()->Add(resultNode); } void QmitkFieldmapGeneratorView::Visible() { - MITK_INFO << "BLABLA"; - mitk::IRenderWindowPart* renderWindowPart = this->GetRenderWindowPart(); - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("axial")->GetSliceNavigationController(); - itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New(); - command->SetCallbackFunction( this, &QmitkFieldmapGeneratorView::OnSliceChanged ); - m_SliceObserverTag1 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(nullptr, 0), command ); - } - - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("sagittal")->GetSliceNavigationController(); - itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New(); - command->SetCallbackFunction( this, &QmitkFieldmapGeneratorView::OnSliceChanged ); - m_SliceObserverTag2 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(nullptr, 0), command ); - } - - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("coronal")->GetSliceNavigationController(); - itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New(); - command->SetCallbackFunction( this, &QmitkFieldmapGeneratorView::OnSliceChanged ); - m_SliceObserverTag3 = slicer->AddObserver( mitk::SliceNavigationController::GeometrySliceEvent(nullptr, 0), command ); - } } void QmitkFieldmapGeneratorView::Hidden() { - mitk::IRenderWindowPart* renderWindowPart = this->GetRenderWindowPart(); - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("axial")->GetSliceNavigationController(); - slicer->RemoveObserver( m_SliceObserverTag1 ); - } - - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("sagittal")->GetSliceNavigationController(); - slicer->RemoveObserver( m_SliceObserverTag2 ); - } - - { - mitk::SliceNavigationController* slicer = renderWindowPart->GetQmitkRenderWindow("coronal")->GetSliceNavigationController(); - slicer->RemoveObserver( m_SliceObserverTag3 ); - } } void QmitkFieldmapGeneratorView::Activated() { + m_SliceChangeListener.RenderWindowPartActivated(this->GetRenderWindowPart()); + connect(&m_SliceChangeListener, SIGNAL(SliceChanged()), this, SLOT(OnSliceChanged())); } void QmitkFieldmapGeneratorView::Deactivated() { } void QmitkFieldmapGeneratorView::OnSelectionChanged(berry::IWorkbenchPart::Pointer /*part*/, const QList& nodes) { if (m_Controls->m_SelectedImageBox->GetSelectedNode().IsNotNull()) m_Controls->m_SelectedImageBox->GetSelectedNode()->RemoveObserver( m_PropertyObserverTag ); m_Controls->m_InputData->setTitle("Please Select Reference Image"); m_SelectedSource = nullptr; // iterate selection for (mitk::DataNode::Pointer node: nodes) { if ( node.IsNotNull() && (dynamic_cast(node->GetData())) ) { m_Controls->m_SourceNameLabel->setText(node->GetName().c_str()); m_SelectedSource = node; float variance = 0; node->GetPropertyValue("pointsize", variance); m_Controls->m_SourceVarianceBox->setValue(variance); float color[3]; node->GetColor(color); m_Controls->m_SourceHeightBox->setValue(color[2]*100); } } if (m_Controls->m_SelectedImageBox->GetSelectedNode().IsNotNull()) { - itk::ReceptorMemberCommand::Pointer command = itk::ReceptorMemberCommand::New(); - command->SetCallbackFunction( this, &QmitkFieldmapGeneratorView::OnSliceChanged ); - m_PropertyObserverTag = m_Controls->m_SelectedImageBox->GetSelectedNode()->AddObserver( itk::ModifiedEvent(), command ); - m_Controls->m_InputData->setTitle("Reference Image"); } } -void QmitkFieldmapGeneratorView::OnSliceChanged(const itk::EventObject& /*e*/) +void QmitkFieldmapGeneratorView::OnSliceChanged() { if (m_Controls->m_SelectedImageBox->GetSelectedNode().IsNull() || !this->GetRenderWindowPart()) { m_Controls->m_WorldPosLabel->setText("-"); m_Controls->m_IndexLabel->setText("-"); return; } m_WorldPoint = this->GetRenderWindowPart()->GetSelectedPosition(); QString posSting = QString::number(m_WorldPoint[0]); posSting += ", "; posSting += QString::number(m_WorldPoint[1]); posSting += ", "; posSting += QString::number(m_WorldPoint[2]); m_Controls->m_WorldPosLabel->setText(posSting.toStdString().c_str()); mitk::Point3D index; mitk::Image::Pointer img = dynamic_cast(m_Controls->m_SelectedImageBox->GetSelectedNode()->GetData()); if ( m_Controls->m_SelectedImageBox->GetSelectedNode()->GetData()->GetGeometry()->IsInside(m_WorldPoint) ) { img->GetGeometry()->WorldToIndex(m_WorldPoint, index); posSting = QString::number(index[0]); posSting += ", "; posSting += QString::number(index[1]); posSting += ", "; posSting += QString::number(index[2]); m_Controls->m_IndexLabel->setText(posSting.toStdString().c_str()); } } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.h b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.h index 05cce38d7f..ca09d0b32c 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorView.h @@ -1,84 +1,86 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _QMITKQmitkFieldmapGeneratorView_H_INCLUDED #define _QMITKQmitkFieldmapGeneratorView_H_INCLUDED #include #include #include #include "ui_QmitkFieldmapGeneratorViewControls.h" #include #include #include "mitkILifecycleAwarePart.h" +#include /*! \brief Generate float image with artificial frequency maps used by Fiberfox. Simulates additional frequencies at (possibly multiple) positions based on 3D gaussians with the specified variance and amplitude and/or as a linear gradient in the image. * See "Fiberfox: Facilitating the creation of realistic white matter software phantoms" (DOI: 10.1002/mrm.25045) for details. */ class QmitkFieldmapGeneratorView : public QmitkAbstractView, public mitk::ILifecycleAwarePart { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: static const std::string VIEW_ID; QmitkFieldmapGeneratorView(); virtual ~QmitkFieldmapGeneratorView(); virtual void CreateQtPartControl(QWidget *parent) override; virtual void SetFocus() override; virtual void Activated() override; virtual void Deactivated() override; virtual void Visible() override; virtual void Hidden() override; - void OnSliceChanged(const itk::EventObject& e); protected slots: void GenerateFieldmap(); void PlaceFieldSource(); void OnVarianceChanged(double value); void OnHeightChanged(double value); + void OnSliceChanged(); protected: /// \brief called by QmitkAbstractView when DataManager's selection has changed virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer part, const QList& nodes) override; Ui::QmitkFieldmapGeneratorViewControls* m_Controls; /** observer flags */ int m_SliceObserverTag1; int m_SliceObserverTag2; int m_SliceObserverTag3; int m_PropertyObserverTag; - mitk::Point3D m_WorldPoint; - mitk::DataNode::Pointer m_SelectedSource; + mitk::Point3D m_WorldPoint; + mitk::DataNode::Pointer m_SelectedSource; + QmitkSliceNavigationListener m_SliceChangeListener; }; #endif // _QmitkFieldmapGeneratorView_H_INCLUDED diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorViewControls.ui index d665a134da..0307ff5144 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberfox/src/internal/QmitkFieldmapGeneratorViewControls.ui @@ -1,353 +1,377 @@ QmitkFieldmapGeneratorViewControls 0 0 - 348 - 511 + 358 + 536 0 0 QmitkTemplate - - - 6 - + 9 9 9 9 - - - - Please Select Reference Image - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - + + 25 + + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - + + - World Coordinates: + Place Field Source - - - - - - + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + World Coordinates: + + + + + + + - + + + + + + + Index: + + + + + + + - + + + + - - + + - Index: + Generate Fieldmap - - - - - - + + + + Please Select Reference Image + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + - - - - Place Field Source - - - - - - - Generate Fieldmap - - - - + Add Gradient 0 0 0 0 Gradient x: z: 4 -1000.000000000000000 1000.000000000000000 4 -1000.000000000000000 1000.000000000000000 y: 4 -1000.000000000000000 1000.000000000000000 Offset 4 -1000.000000000000000 1000.000000000000000 4 -1000.000000000000000 1000.000000000000000 4 -1000.000000000000000 1000.000000000000000 - + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 220 + + + + + Edit Selected Source 0 0 0 0 Name: Height: Variance: - 999999.000000000000000 999999.000000000000000 - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 220 - - - - QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/Perspectives/QmitkFiberProcessingPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/Perspectives/QmitkFiberProcessingPerspective.cpp index 5e61d1afaf..d8529d2770 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/Perspectives/QmitkFiberProcessingPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/Perspectives/QmitkFiberProcessingPerspective.cpp @@ -1,52 +1,51 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkFiberProcessingPerspective.h" #include "berryIViewLayout.h" void QmitkFiberProcessingPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", - false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", - false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", - berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", - berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// - left->AddView("org.mitk.views.fiberprocessing"); - left->AddView("org.mitk.views.fiberquantification"); - left->AddView("org.mitk.views.fiberclustering"); - left->AddView("org.mitk.views.fiberfit"); - left->AddView("org.mitk.views.segmentation"); + left->AddView("org.mitk.views.fiberprocessing"); + left->AddView("org.mitk.views.fiberquantification"); + left->AddView("org.mitk.views.fiberclustering"); + left->AddView("org.mitk.views.fiberfit"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberProcessingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberProcessingViewControls.ui index 4fe19b14aa..91638b06bf 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberProcessingViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberProcessingViewControls.ui @@ -1,1544 +1,1580 @@ QmitkFiberProcessingViewControls 0 0 385 684 Form + + 9 + + + 9 + + + 9 + + + 9 + 0 5 0 0 353 443 Fiber Extraction Extract a fiber subset from the selected fiber bundle using manually placed planar figures as waypoints or binary regions of interest. false 0 0 200 16777215 11 Extract fibers passing through selected ROI or composite ROI. Select ROI and fiber bundle to execute. Extract Qt::Vertical 20 40 QFrame::NoFrame QFrame::Raised - 9 + 0 - 9 + 0 - 9 + 0 - 9 + 0 - 0 + 6 - - + + + + Interactive Extraction + + + + + 0 0 200 0 16777215 60 QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - - - false - + + - 60 - 16777215 + 30 + 30 - Create OR composition with selected ROIs. + Draw circular ROI. Select reference fiber bundle to execute. - OR + + + + + :/QmitkDiffusionImaging/circle.png:/QmitkDiffusionImaging/circle.png + + + + 32 + 32 + + + + false + + + true - - + + Qt::Horizontal 40 20 - - - - false - + + - 60 - 16777215 + 30 + 30 - Create NOT composition from selected ROI. + Draw polygonal ROI. Select reference fiber bundle to execute. - NOT + - - - - - - false + + + :/QmitkDiffusionImaging/polygon.png:/QmitkDiffusionImaging/polygon.png - + - 60 - 16777215 + 32 + 32 - - Create AND composition with selected ROIs. + + true - - AND + + true - - + + 0 0 200 0 16777215 60 QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - + + + + false + - 30 - 30 + 60 + 16777215 - Draw circular ROI. Select reference fiber bundle to execute. + Create NOT composition from selected ROI. - + NOT - - - :/QmitkDiffusionImaging/circle.png:/QmitkDiffusionImaging/circle.png + + + + + + false - + - 32 - 32 + 60 + 16777215 - - false + + Create OR composition with selected ROIs. - - true + + OR - - + + Qt::Horizontal 40 20 - - + + + + false + - 30 - 30 + 60 + 16777215 - Draw polygonal ROI. Select reference fiber bundle to execute. + Create AND composition with selected ROIs. - - - - - :/QmitkDiffusionImaging/polygon.png:/QmitkDiffusionImaging/polygon.png - - - - 32 - 32 - - - - true - - - true + AND false 0 0 16777215 16777215 11 Generate a binary image containing all selected ROIs. Select at least one ROI (planar figure) and a reference fiber bundle or image. Generate ROI Image - - - - Interactive Extraction - - - 0 0 Extract using planar figures Extract using ROI image QFrame::NoFrame QFrame::Raised 0 0 0 0 Min. overlap: Extract fibers: Both ends true 3 1.000000000000000 0.100000000000000 0 0 Ending in ROI Not ending in ROI Passing ROI Not passing ROI Interpolate ROI true Threshold: Threshold on ROI image for positions to be considered as positive. 3 9999.000000000000000 0.100000000000000 0.500000000000000 0 0 367 408 Fiber Removal Remove fibers that satisfy certain criteria from the selected bundle. QFrame::NoFrame QFrame::Raised 0 0 0 0 If unchecked, the fiber exceeding the threshold will be split in two instead of removed. Remove Fiber false QFrame::NoFrame QFrame::Raised 0 0 0 0 0 Max. Angular Deviation: Qt::Horizontal 40 20 Maximum angular deviation in degree 180.000000000000000 0.100000000000000 30.000000000000000 Distance: Distance in mm 1 999.000000000000000 1.000000000000000 10.000000000000000 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 X: Y: Z: Angle: Angular deviation threshold in degree 1 90.000000000000000 1.000000000000000 25.000000000000000 QFrame::NoFrame QFrame::Raised 0 0 0 0 Qt::Horizontal 40 20 Minimum fiber length in mm 0 999999999 20 Max. Length: Min. Length: Maximum fiber length in mm 0 999999999 300 false 0 0 200 16777215 11 Remove Qt::Vertical 20 40 0 0 Remove fibers in direction Remove fibers by length Remove fibers by curvature Remove fiber parts outside mask Remove fiber parts inside mask Remove fibers by weight QFrame::NoFrame QFrame::Raised 0 0 0 0 0 Weight threshold: Only fibers with weight larger than this threshold are kept. 5 99999.000000000000000 0.100000000000000 0 0 367 408 Bundle Modification Modify the selected bundle with operations such as fiber resampling, FA coloring, etc. QFrame::NoFrame QFrame::Raised 0 0 0 0 - + 0 + + 6 + Error threshold in mm: 999999999.000000000000000 0.100000000000000 0.100000000000000 QFrame::NoFrame QFrame::Raised 0 0 0 0 - + 0 + + 6 + Sagittal Coronal Axial Select direction: QFrame::NoFrame QFrame::Raised 0 0 0 0 - + 0 + + 6 + If checked, the image values are not only used to color the fibers but are also used as opaxity values. Values as opacity false Scalar map: The values used to color the fibers are min-max normalized. If not checked, the values should be between 0 and 1. Normalize values true 0 0 Resample fibers (spline) Resample fibers (linear) Compress fibers Color fibers by scalar map (e.g. FA) Mirror fibers Weight bundle Color fibers by curvature Color fibers by fiber weights QFrame::NoFrame QFrame::Raised 0 0 0 0 - + 0 + + 6 + 0.010000000000000 999999999.000000000000000 0.100000000000000 1.000000000000000 Point distance in mm: Qt::Vertical 20 40 false 0 0 200 16777215 11 Execute QFrame::NoFrame QFrame::Raised 0 0 0 0 0 Weight: 7 999999999.000000000000000 0.100000000000000 1.000000000000000 0 0 367 165 Bundle Operations Join, subtract or copy bundles. false 0 0 200 16777215 11 Returns all fibers contained in bundle X that are not contained in bundle Y (not commutative!). Select at least two fiber bundles to execute. Substract Qt::Vertical 20 40 false 0 0 200 16777215 11 Merge selected fiber bundles. Select at least two fiber bundles to execute. Join false 0 0 200 16777215 11 Merge selected fiber bundles. Select at least two fiber bundles to execute. Copy Please Select Input Data + + 0 + + + 0 + + + 0 + + + 0 + <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> true <html><head/><body><p><span style=" color:#969696;">needed for extraction</span></p></body></html> true Input DTI Fiber Bundle: Binary seed ROI. If not specified, the whole image area is seeded. ROI: Qt::Vertical 20 40 QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberQuantificationViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberQuantificationViewControls.ui index 399ba8db30..d5cac10364 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberQuantificationViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.fiberprocessing/src/internal/QmitkFiberQuantificationViewControls.ui @@ -1,357 +1,381 @@ QmitkFiberQuantificationViewControls 0 0 - 484 - 574 + 365 + 565 Form - - - - Qt::Vertical - - - - 20 - 40 - - - - + + 25 + Fiber-derived images - - - QFormLayout::AllNonFixedFieldsGrow + + + 0 + + + 0 + + + 0 + + + 0 - + false 0 0 200 16777215 11 Perform selected operation on all selected fiber bundles. Generate Image - - + + - + 0 0 + + Upsampling factor + + + 1 + + + 0.100000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + + 0 + 0 + + + + + Tract Density Image (TDI) + + + + + Normalized TDI + + + + + Binary Envelope + + + + + Fiber Bundle Image + + + + + Fiber Endings Image + + + + + Fiber Endings Pointset + + + + + + + + + + + Fiber Statistics + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + Courier 10 Pitch + + + + false + + + true + + + + + + + + + + Principal Fiber Directions + + + + 0 + + + 0 + + + 0 + + + 0 + + + QFrame::NoFrame QFrame::Raised - - 0 - - + 0 0 0 0 - - 0 - - - + + - + 0 0 - - - Tract Density Image (TDI) - - - - - Normalized TDI - - - - - Binary Envelope - - - - - Fiber Bundle Image - - - - - Fiber Endings Image - - - - - Fiber Endings Pointset - - + + Fiber directions with an angle smaller than the defined threshold are clustered. + + + 2 + + + 0.000000000000000 + + + 90.000000000000000 + + + 1.000000000000000 + + + 30.000000000000000 + - - + + - + 0 0 - Upsampling factor + <html><head/><body><p>Directions shorter than the defined threshold are discarded.</p></body></html> - 1 - - - 0.100000000000000 + 3 - 10.000000000000000 + 1.000000000000000 0.100000000000000 - 1.000000000000000 + 0.300000000000000 + + + + + + + Angular Threshold: + + + + + + + Max. clusters: + + + + + + + Size Threshold: + + + + + + + + 0 + 0 + + + + Maximum number of fiber directions per voxel. + + + 100 + + + 3 + + + + Normalization: + + + + + + + + 0 + 0 + + + + + Global maximum + + + + + Single vector + + + + + Voxel-wise maximum + + + + - - - - - - - Fiber Statistics - - - - - - - Courier 10 Pitch - - - - false - - - true - - - - - - - - - - Principal Fiber Directions - - - - - - Maximum number of fiber directions per voxel. - - - 100 - - - 3 - - - - + - - Image containing the number of distinct fiber clusters per voxel. - - - Output #Directions per Voxel - - - true - - - - - - - false - 0 0 - - - 200 - 16777215 - - - - - 11 - - - + Image containing the number of distinct fiber clusters per voxel. - Start + Output #Directions per Voxel - - - - - - Max. clusters: + + true - - - Size Threshold: - - - - - - - Angular Threshold: - - - - - - - <html><head/><body><p>Directions shorter than the defined threshold are discarded.</p></body></html> - - - 3 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.300000000000000 - - - - - - - Fiber directions with an angle smaller than the defined threshold are clustered. - - - 2 - - - 0.000000000000000 - - - 90.000000000000000 - - - 1.000000000000000 - - - 30.000000000000000 + + + false - - - - - Normalization: + Generate Directions - - - - - Global maximum - - - - - Single vector - - - - - Voxel-wise maximum - - - - diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/Perspectives/QmitkDIAppIVIMPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/Perspectives/QmitkDIAppIVIMPerspective.cpp index 0c8192235f..a5c930c5e2 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/Perspectives/QmitkDIAppIVIMPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/Perspectives/QmitkDIAppIVIMPerspective.cpp @@ -1,51 +1,46 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkDIAppIVIMPerspective.h" #include "berryIViewLayout.h" void QmitkDIAppIVIMPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// - left->AddView("org.mitk.views.ivim"); - berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.ivim"); - - - left->AddView("org.mitk.views.segmentation"); - lo = layout->GetViewLayout("org.mitk.views.segmentation"); - left->AddView("org.mitk.views.diffusionquantification"); - left->AddView("org.mitk.views.diffusionpreprocessing"); + left->AddView("org.mitk.views.ivim"); + left->AddView("org.mitk.views.segmentation"); + left->AddView("org.mitk.views.imagestatistics"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/QmitkIVIMViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/QmitkIVIMViewControls.ui index 19a73a338d..1da4ca83fa 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/QmitkIVIMViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.ivim/src/internal/QmitkIVIMViewControls.ui @@ -1,1158 +1,1185 @@ QmitkIVIMViewControls 0 0 423 1563 0 0 QmitkTemplate - + 9 9 9 9 - + + 9 + + Intra Voxel Incoherent Motion Estimation 0 9 0 0 - + Please Select Input Data + + 0 + + + 0 + + + 0 + + + 0 + Optional ROI image ROI: DWI to analyze <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> Optional ROI image <html><head/><body><p><span style=" color:#969696;">optional</span></p></body></html> DWI to analyze Raw DWI: - + QFrame::NoFrame QFrame::Raised - - - 0 - + 0 0 0 0 - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - + warning display Qt::RichText true + + + + 0 + 0 + 16 + 16 + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + 0 + 0 + 16 + 16 + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + 0 + 0 + 16 + 16 + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + - + QFrame::StyledPanel QFrame::Raised - - - 0 - + 0 0 0 0 - + 0 0 0 IVIM Parameters 9 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 D* 100 60 Qt::Horizontal 51 16777215 200 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 neglect b< 250 34 Qt::Horizontal 51 16777215 46.5 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 #iterations 100 10 Qt::Horizontal 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 0 80 16777215 lambda 1000 10 Qt::Horizontal 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 0 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 15 16777215 Calculate threshold from histogram * QFrame::NoFrame QFrame::Plain 0 0 0 0 0 80 16777215 neglect Si< 100 0 Qt::Horizontal 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0 0 30 16777215 TextLabel Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 15 16777215 Calculate threshold from histogram * QFrame::NoFrame QFrame::Raised 0 0 0 0 80 0 Output Images f true D false D* false true 0 0 0 400 Choose Method 2 3 Param. Fit Fit D & f with fixed D* value Fit D & f (high b), then fit D* Linearly fit D & f (high b), then fit D* Regularized Kurtosis QFrame::StyledPanel QFrame::Raised 2 2 2 2 2 Smoothing sigma Select Fit Type Omit b=0 Measurement 80 0 Output Images Force the fitting of K to remain within the given boundaries Boundaries for K Select if the data is fitted directly (straight) or the logarithmic equation is used Straight Fit Logarithmic Fit 2 QLayout::SetMaximumSize D false K true Signa for gaussian smoothing applied prior to map computation 0.000000000000000 5.000000000000000 0.100000000000000 On 0 0 0 400 - + Generate Output Images - + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - + QFrame::NoFrame QFrame::Raised 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 Datapoints to Clipboard Parameters to Clipboard QmitkIVIMWidget QWidget
QmitkIVIMWidget.h
1
QmitkKurtosisWidget QWidget
QmitkKurtosisWidget.h
1
ctkRangeWidget QWidget
ctkRangeWidget.h
1
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.odfpeaks/src/internal/QmitkOdfMaximaExtractionViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.odfpeaks/src/internal/QmitkOdfMaximaExtractionViewControls.ui index 120ad88742..4a404eae71 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.odfpeaks/src/internal/QmitkOdfMaximaExtractionViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.odfpeaks/src/internal/QmitkOdfMaximaExtractionViewControls.ui @@ -1,435 +1,462 @@ QmitkOdfMaximaExtractionViewControls 0 0 397 848 Form - - - - true - - - Generate ODF image and MITK compatible SH coefficient from other toolkits. + + 25 + + + + + QFrame::NoFrame - - Start SH Coefficient Import + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true + + + Generate ODF image and MITK compatible SH coefficient from other toolkits. + + + Start SH Coefficient Import + + + + + + + true + + + Extract ODF peaks using finite differences on the densely sampled ODF surface. + + + Start Peak Extraction + + + + + + + Please Select Input Data + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Select a tensor image or a SH coefficient image (generate using Q-Ball reconstruction view). + + + ShCoeff/DTI: + + + + + + + Mask Image: + + + + + + + + + + + + + - - - - Qt::Vertical - - - - 20 - 259 - - - - - + Additional Output QFormLayout::AllNonFixedFieldsGrow 0 0 0 0 Output unsigned char image containing the number of directions per voxel. #Peaks per Voxel false - + Parameters 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 6 Vector Normalization: <html><head/><body><p>The vector fields are always coorected for image spacing and using the lagest eigenvalue in case of the tensor peak extraction. This is done for visualizytion purposes. The output direction images are not affected.</p></body></html> 1 No Normalization MAX Normalize Single Vec Normalization true QFrame::NoFrame QFrame::Raised 0 0 0 0 6 true Max. Peaks: Relative Threshold: true Peak threshold relative to the largest peak per voxel. 3 0.000000000000000 1.000000000000000 0.100000000000000 0.500000000000000 true Absolute peak threshold (only used for the finite differences method). The value is additionally scaled by 1/GFA. 3 0.000000000000000 1.000000000000000 0.010000000000000 0.030000000000000 true Maximum number of peaks to extract. 1 1000 3 Clustering Angle: Cluster close directions. Define "close" here. 90 30 Absolute Threshold: Angular Threshold: Discard smaller peaks in the defined angle around the maximum peaks that were too far away to be clustered. 0 90 0 - - - - Please Select Input Data - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Select a tensor image or a SH coefficient image (generate using Q-Ball reconstruction view). - - - ShCoeff/DTI: - - - - - - - Mask Image: - - - - - - - - - - - - - - - - true - - - Extract ODF peaks using finite differences on the densely sampled ODF surface. - - - Start Peak Extraction - - - - + Spherical Harmonic Convention 0 0 0 0 Define SH coefficient convention (depends on toolkit) 0 MITK/FSL MRtrix + + + + Qt::Vertical + + + + 20 + 259 + + + + QmitkDataStorageComboBoxWithSelectNone QComboBox
QmitkDataStorageComboBoxWithSelectNone.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/files.cmake index 0009a93c61..f24fdc236a 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/files.cmake @@ -1,42 +1,43 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp - + QmitkPreprocessingView.cpp + QmitkDwiPreprocessingPerspective.cpp ) set(UI_FILES src/internal/QmitkPreprocessingViewControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/QmitkPreprocessingView.h + src/internal/QmitkDwiPreprocessingPerspective.h ) set(CACHED_RESOURCE_FILES plugin.xml - - resources/preprocessing.png + resources/dwi2.png ) set(QRC_FILES ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/plugin.xml index 6fe5a3812b..cc085d4be1 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/plugin.xml @@ -1,17 +1,28 @@ + + + + This perspective contains views for diffusion-weighted image preprocessing such as head motion correction, registration, denoising and gradient manipulation. + + + + diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.png deleted file mode 100644 index d7564ca333..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.xcf b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.xcf deleted file mode 100644 index c7b840caf9..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/preprocessing.xcf and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/prprocessing.svg b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/prprocessing.svg new file mode 100644 index 0000000000..f999c4dd3a --- /dev/null +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/resources/prprocessing.svg @@ -0,0 +1,149 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.cpp similarity index 88% rename from Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.cpp rename to Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.cpp index ed5f3f8a56..e1ec1795ab 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.cpp @@ -1,49 +1,51 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "QmitkDwiRegistrationPerspective.h" +#include "QmitkDwiPreprocessingPerspective.h" #include "berryIViewLayout.h" -void QmitkDwiRegistrationPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) +void QmitkDwiPreprocessingPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { ///////////////////////////////////////////////////// // all di-app perspectives should have the following: ///////////////////////////////////////////////////// QString editorArea = layout->GetEditorArea(); layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); layout->AddStandaloneView("org.mitk.views.datamanager", false, berry::IPageLayout::LEFT, 0.3f, editorArea); layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); berry::IFolderLayout::Pointer left = layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); ///////////////////////////////////////////// // here goes the perspective specific stuff ///////////////////////////////////////////// + left->AddView("org.mitk.views.diffusionpreprocessing"); + left->AddView("org.mitk.views.denoisingview"); left->AddView("org.mitk.views.simpleregistrationview"); left->AddView("org.mitk.views.headmotioncorrectionview"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.h similarity index 73% copy from Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h copy to Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.h index c89a61672e..bdfc1cf04f 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkDwiPreprocessingPerspective.h @@ -1,36 +1,36 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef QmitkDwiRegistrationPerspective_H_ -#define QmitkDwiRegistrationPerspective_H_ +#ifndef QmitkDwiPreprocessingPerspective_H_ +#define QmitkDwiPreprocessingPerspective_H_ #include -class QmitkDwiRegistrationPerspective : public QObject, public berry::IPerspectiveFactory +class QmitkDwiPreprocessingPerspective : public QObject, public berry::IPerspectiveFactory { Q_OBJECT Q_INTERFACES(berry::IPerspectiveFactory) public: - QmitkDwiRegistrationPerspective() {} - ~QmitkDwiRegistrationPerspective() {} + QmitkDwiPreprocessingPerspective() {} + ~QmitkDwiPreprocessingPerspective() {} void CreateInitialLayout(berry::IPageLayout::Pointer layout) override; }; #endif /* QmitkFiberProcessingPerspective_H_ */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingView.cpp index 0fd430d313..7a61bff986 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingView.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingView.cpp @@ -1,1962 +1,1962 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ //#define MBILOG_ENABLE_DEBUG #include "QmitkPreprocessingView.h" #include "mitkDiffusionImagingConfigure.h" // qt includes #include // itk includes #include "itkTimeProbe.h" #include "itkB0ImageExtractionImageFilter.h" #include "itkB0ImageExtractionToSeparateImageFilter.h" #include "itkBrainMaskExtractionImageFilter.h" #include "itkCastImageFilter.h" #include "itkVectorContainer.h" #include #include #include #include #include #include // Multishell includes #include // Multishell Functors #include #include #include #include // mitk includes #include "QmitkDataStorageComboBox.h" #include "mitkProgressBar.h" #include "mitkStatusBar.h" #include "mitkNodePredicateDataType.h" #include "mitkProperties.h" #include "mitkVtkResliceInterpolationProperty.h" #include "mitkLookupTable.h" #include "mitkLookupTableProperty.h" #include "mitkTransferFunction.h" #include "mitkTransferFunctionProperty.h" #include "mitkDataNodeObject.h" #include "mitkOdfNormalizationMethodProperty.h" #include "mitkOdfScaleByProperty.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include const std::string QmitkPreprocessingView::VIEW_ID = - "org.mitk.views.preprocessing"; + "org.mitk.views.diffusionpreprocessing"; #define DI_INFO MITK_INFO("DiffusionImaging") typedef float TTensorPixelType; QmitkPreprocessingView::QmitkPreprocessingView() : QmitkAbstractView(), m_Controls(nullptr) { } QmitkPreprocessingView::~QmitkPreprocessingView() { } void QmitkPreprocessingView::CreateQtPartControl(QWidget *parent) { if (!m_Controls) { // create GUI widgets m_Controls = new Ui::QmitkPreprocessingViewControls; m_Controls->setupUi(parent); this->CreateConnections(); m_Controls->m_MeasurementFrameTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); m_Controls->m_MeasurementFrameTable->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch); m_Controls->m_DirectionMatrixTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); m_Controls->m_DirectionMatrixTable->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch); } } void QmitkPreprocessingView::SetFocus() { m_Controls->m_MirrorGradientToHalfSphereButton->setFocus(); } void QmitkPreprocessingView::CreateConnections() { if ( m_Controls ) { m_Controls->m_NormalizationMaskBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_SelctedImageComboBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_MergeDwiBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_AlignImageBox->SetDataStorage(this->GetDataStorage()); mitk::TNodePredicateDataType::Pointer isMitkImage = mitk::TNodePredicateDataType::New(); mitk::NodePredicateDataType::Pointer isDti = mitk::NodePredicateDataType::New("TensorImage"); mitk::NodePredicateDataType::Pointer isOdf = mitk::NodePredicateDataType::New("OdfImage"); mitk::NodePredicateOr::Pointer isDiffusionImage = mitk::NodePredicateOr::New(isOdf, isDti); mitk::NodePredicateAnd::Pointer noDiffusionImage = mitk::NodePredicateAnd::New(isMitkImage, mitk::NodePredicateNot::New(isDiffusionImage)); mitk::NodePredicateProperty::Pointer isBinaryPredicate = mitk::NodePredicateProperty::New("binary", mitk::BoolProperty::New(true)); mitk::NodePredicateAnd::Pointer binaryNoDiffusionImage = mitk::NodePredicateAnd::New(noDiffusionImage, isBinaryPredicate); m_Controls->m_NormalizationMaskBox->SetPredicate(binaryNoDiffusionImage); m_Controls->m_SelctedImageComboBox->SetPredicate(isMitkImage); m_Controls->m_MergeDwiBox->SetPredicate(isMitkImage); m_Controls->m_AlignImageBox->SetPredicate(isMitkImage); m_Controls->m_ExtractBrainMask->setVisible(false); m_Controls->m_BrainMaskIterationsBox->setVisible(false); m_Controls->m_ResampleIntFrame->setVisible(false); connect( (QObject*)(m_Controls->m_ButtonAverageGradients), SIGNAL(clicked()), this, SLOT(AverageGradients()) ); connect( (QObject*)(m_Controls->m_ButtonExtractB0), SIGNAL(clicked()), this, SLOT(ExtractB0()) ); connect( (QObject*)(m_Controls->m_ReduceGradientsButton), SIGNAL(clicked()), this, SLOT(DoReduceGradientDirections()) ); connect( (QObject*)(m_Controls->m_ShowGradientsButton), SIGNAL(clicked()), this, SLOT(DoShowGradientDirections()) ); connect( (QObject*)(m_Controls->m_MirrorGradientToHalfSphereButton), SIGNAL(clicked()), this, SLOT(DoHalfSphereGradientDirections()) ); connect( (QObject*)(m_Controls->m_MergeDwisButton), SIGNAL(clicked()), this, SLOT(MergeDwis()) ); connect( (QObject*)(m_Controls->m_ProjectSignalButton), SIGNAL(clicked()), this, SLOT(DoProjectSignal()) ); connect( (QObject*)(m_Controls->m_B_ValueMap_Rounder_SpinBox), SIGNAL(valueChanged(int)), this, SLOT(UpdateDwiBValueMapRounder(int))); connect( (QObject*)(m_Controls->m_CreateLengthCorrectedDwi), SIGNAL(clicked()), this, SLOT(DoLengthCorrection()) ); connect( (QObject*)(m_Controls->m_NormalizeImageValuesButton), SIGNAL(clicked()), this, SLOT(DoDwiNormalization()) ); connect( (QObject*)(m_Controls->m_ResampleImageButton), SIGNAL(clicked()), this, SLOT(DoResampleImage()) ); connect( (QObject*)(m_Controls->m_ResampleTypeBox), SIGNAL(currentIndexChanged(int)), this, SLOT(DoUpdateInterpolationGui(int)) ); connect( (QObject*)(m_Controls->m_CropImageButton), SIGNAL(clicked()), this, SLOT(DoCropImage()) ); connect( (QObject*)(m_Controls->m_RemoveGradientButton), SIGNAL(clicked()), this, SLOT(DoRemoveGradient()) ); connect( (QObject*)(m_Controls->m_ExtractGradientButton), SIGNAL(clicked()), this, SLOT(DoExtractGradient()) ); connect( (QObject*)(m_Controls->m_FlipAxis), SIGNAL(clicked()), this, SLOT(DoFlipAxis()) ); connect( (QObject*)(m_Controls->m_FlipGradientsButton), SIGNAL(clicked()), this, SLOT(DoFlipGradientDirections()) ); connect( (QObject*)(m_Controls->m_ClearRotationButton), SIGNAL(clicked()), this, SLOT(DoClearRotationOfGradients()) ); connect( (QObject*)(m_Controls->m_ModifyHeader), SIGNAL(clicked()), this, SLOT(DoApplyHeader()) ); connect( (QObject*)(m_Controls->m_AlignImageButton), SIGNAL(clicked()), this, SLOT(DoAlignImages()) ); connect( (QObject*)(m_Controls->m_SelctedImageComboBox), SIGNAL(OnSelectionChanged(const mitk::DataNode*)), this, SLOT(OnImageSelectionChanged()) ); m_Controls->m_NormalizationMaskBox->SetZeroEntryText("--"); } } void QmitkPreprocessingView::DoAlignImages() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } mitk::DataNode::Pointer target_node = m_Controls->m_AlignImageBox->GetSelectedNode(); if (target_node.IsNull()) { return; } mitk::Image::Pointer target_image = dynamic_cast(target_node->GetData()); if ( target_image == nullptr ) { return; } image->SetOrigin(target_image->GetGeometry()->GetOrigin()); mitk::RenderingManager::GetInstance()->InitializeViews( image->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } void QmitkPreprocessingView::DoFlipAxis() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(node) ); if (isDiffusionImage) { ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); itk::FixedArray flipAxes; flipAxes[0] = m_Controls->m_FlipX->isChecked(); flipAxes[1] = m_Controls->m_FlipY->isChecked(); flipAxes[2] = m_Controls->m_FlipZ->isChecked(); itk::FlipImageFilter< ItkDwiType >::Pointer flipper = itk::FlipImageFilter< ItkDwiType >::New(); flipper->SetInput(itkVectorImagePointer); flipper->SetFlipAxes(flipAxes); flipper->Update(); GradProp::GradientDirectionsContainerType::Pointer oldGradients = static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); GradProp::GradientDirectionsContainerType::Pointer newGradients = GradProp::GradientDirectionsContainerType::New(); for (unsigned int i=0; iSize(); i++) { GradProp::GradientDirectionType g = oldGradients->GetElement(i); GradProp::GradientDirectionType newG = g; if (flipAxes[0]) { newG[0] *= -1; } if (flipAxes[1]) { newG[1] *= -1; } if (flipAxes[2]) { newG[2] *= -1; } newGradients->InsertElement(i, newG); } mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( flipper->GetOutput() ); PropHelper::CopyProperties(image, newImage, true); newImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( newGradients ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); newImage->GetGeometry()->SetOrigin(image->GetGeometry()->GetOrigin()); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_flipped").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } else if( image->GetPixelType().GetNumberOfComponents() == 1 ) { AccessFixedDimensionByItk(image, TemplatedFlipAxis,3); } else { QMessageBox::warning(nullptr,"Warning", QString("Operation not supported in multi-component images") ); } } template < typename TPixel, unsigned int VImageDimension > void QmitkPreprocessingView::TemplatedFlipAxis(itk::Image* itkImage) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } itk::FixedArray flipAxes; flipAxes[0] = m_Controls->m_FlipX->isChecked(); flipAxes[1] = m_Controls->m_FlipY->isChecked(); flipAxes[2] = m_Controls->m_FlipZ->isChecked(); typename itk::FlipImageFilter< itk::Image >::Pointer flipper = itk::FlipImageFilter< itk::Image >::New(); flipper->SetInput(itkImage); flipper->SetFlipAxes(flipAxes); flipper->Update(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( flipper->GetOutput() ); newImage->GetGeometry()->SetOrigin(image->GetGeometry()->GetOrigin()); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_flipped").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } void QmitkPreprocessingView::DoRemoveGradient() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } std::vector< unsigned int > channelsToRemove; channelsToRemove.push_back(m_Controls->m_RemoveGradientBox->value()); ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); itk::RemoveDwiChannelFilter< short >::Pointer filter = itk::RemoveDwiChannelFilter< short >::New(); filter->SetInput(itkVectorImagePointer); filter->SetChannelIndices(channelsToRemove); filter->SetDirections( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); filter->Update(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( filter->GetOutput() ); PropHelper::CopyProperties(image, newImage, true); newImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( filter->GetNewDirections() ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_removedgradients").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } void QmitkPreprocessingView::DoExtractGradient() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); unsigned int channel = m_Controls->m_ExtractGradientBox->value(); itk::ExtractDwiChannelFilter< short >::Pointer filter = itk::ExtractDwiChannelFilter< short >::New(); filter->SetInput( itkVectorImagePointer); filter->SetChannelIndex(channel); filter->Update(); mitk::Image::Pointer newImage = mitk::Image::New(); newImage->InitializeByItk( filter->GetOutput() ); newImage->SetImportChannel( filter->GetOutput()->GetBufferPointer() ); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName( (name+"_direction-"+QString::number(channel)).toStdString().c_str() ); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true); } void QmitkPreprocessingView::DoCropImage() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( isDiffusionImage ) { ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); ItkDwiType::SizeType lower; ItkDwiType::SizeType upper; lower[0] = m_Controls->m_XstartBox->value(); lower[1] = m_Controls->m_YstartBox->value(); lower[2] = m_Controls->m_ZstartBox->value(); upper[0] = m_Controls->m_XendBox->value(); upper[1] = m_Controls->m_YendBox->value(); upper[2] = m_Controls->m_ZendBox->value(); itk::CropImageFilter< ItkDwiType, ItkDwiType >::Pointer cropper = itk::CropImageFilter< ItkDwiType, ItkDwiType >::New(); cropper->SetLowerBoundaryCropSize(lower); cropper->SetUpperBoundaryCropSize(upper); cropper->SetInput( itkVectorImagePointer ); cropper->Update(); ItkDwiType::Pointer itkOutImage = cropper->GetOutput(); ItkDwiType::DirectionType dir = itkOutImage->GetDirection(); itk::Point origin = itkOutImage->GetOrigin(); itk::Point t; t[0] = lower[0]*itkOutImage->GetSpacing()[0]; t[1] = lower[1]*itkOutImage->GetSpacing()[1]; t[2] = lower[2]*itkOutImage->GetSpacing()[2]; t= dir*t; origin[0] += t[0]; origin[1] += t[1]; origin[2] += t[2]; itkOutImage->SetOrigin(origin); mitk::Image::Pointer newimage = mitk::GrabItkImageMemory( itkOutImage ); PropHelper::CopyProperties(image, newimage, false); PropHelper propertyHelper( newimage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newimage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_cropped").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } else if( image->GetPixelType().GetNumberOfComponents() ) { AccessFixedDimensionByItk(image, TemplatedCropImage,3); } else { QMessageBox::warning(nullptr,"Warning", QString("Operation not supported in multi-component images") ); } } template < typename TPixel, unsigned int VImageDimension > void QmitkPreprocessingView::TemplatedCropImage( itk::Image* itkImage) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } ItkDwiType::SizeType lower; ItkDwiType::SizeType upper; lower[0] = m_Controls->m_XstartBox->value(); lower[1] = m_Controls->m_YstartBox->value(); lower[2] = m_Controls->m_ZstartBox->value(); upper[0] = m_Controls->m_XendBox->value(); upper[1] = m_Controls->m_YendBox->value(); upper[2] = m_Controls->m_ZendBox->value(); typedef itk::Image ImageType; typename itk::CropImageFilter< ImageType, ImageType >::Pointer cropper = itk::CropImageFilter< ImageType, ImageType >::New(); cropper->SetLowerBoundaryCropSize(lower); cropper->SetUpperBoundaryCropSize(upper); cropper->SetInput(itkImage); cropper->Update(); typename ImageType::Pointer itkOutImage = cropper->GetOutput(); typename ImageType::DirectionType dir = itkOutImage->GetDirection(); itk::Point origin = itkOutImage->GetOrigin(); itk::Point t; t[0] = lower[0]*itkOutImage->GetSpacing()[0]; t[1] = lower[1]*itkOutImage->GetSpacing()[1]; t[2] = lower[2]*itkOutImage->GetSpacing()[2]; t= dir*t; origin[0] += t[0]; origin[1] += t[1]; origin[2] += t[2]; itkOutImage->SetOrigin(origin); mitk::Image::Pointer image = mitk::Image::New(); image->InitializeByItk( itkOutImage.GetPointer() ); image->SetVolume( itkOutImage->GetBufferPointer() ); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( image ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_cropped").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } void QmitkPreprocessingView::DoUpdateInterpolationGui(int i) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } switch (i) { case 0: { m_Controls->m_ResampleIntFrame->setVisible(false); m_Controls->m_ResampleDoubleFrame->setVisible(true); break; } case 1: { m_Controls->m_ResampleIntFrame->setVisible(false); m_Controls->m_ResampleDoubleFrame->setVisible(true); mitk::BaseGeometry* geom = image->GetGeometry(); m_Controls->m_ResampleDoubleX->setValue(geom->GetSpacing()[0]); m_Controls->m_ResampleDoubleY->setValue(geom->GetSpacing()[1]); m_Controls->m_ResampleDoubleZ->setValue(geom->GetSpacing()[2]); break; } case 2: { m_Controls->m_ResampleIntFrame->setVisible(true); m_Controls->m_ResampleDoubleFrame->setVisible(false); mitk::BaseGeometry* geom = image->GetGeometry(); m_Controls->m_ResampleIntX->setValue(geom->GetExtent(0)); m_Controls->m_ResampleIntY->setValue(geom->GetExtent(1)); m_Controls->m_ResampleIntZ->setValue(geom->GetExtent(2)); break; } default: { m_Controls->m_ResampleIntFrame->setVisible(false); m_Controls->m_ResampleDoubleFrame->setVisible(true); } } } void QmitkPreprocessingView::DoExtractBrainMask() { } void QmitkPreprocessingView::DoResampleImage() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( isDiffusionImage ) { ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); typedef itk::ResampleDwiImageFilter< short > ResampleFilter; ResampleFilter::Pointer resampler = ResampleFilter::New(); resampler->SetInput( itkVectorImagePointer ); switch (m_Controls->m_ResampleTypeBox->currentIndex()) { case 0: { itk::Vector< double, 3 > samplingFactor; samplingFactor[0] = m_Controls->m_ResampleDoubleX->value(); samplingFactor[1] = m_Controls->m_ResampleDoubleY->value(); samplingFactor[2] = m_Controls->m_ResampleDoubleZ->value(); resampler->SetSamplingFactor(samplingFactor); break; } case 1: { itk::Vector< double, 3 > newSpacing; newSpacing[0] = m_Controls->m_ResampleDoubleX->value(); newSpacing[1] = m_Controls->m_ResampleDoubleY->value(); newSpacing[2] = m_Controls->m_ResampleDoubleZ->value(); resampler->SetNewSpacing(newSpacing); break; } case 2: { itk::ImageRegion<3> newRegion; newRegion.SetSize(0, m_Controls->m_ResampleIntX->value()); newRegion.SetSize(1, m_Controls->m_ResampleIntY->value()); newRegion.SetSize(2, m_Controls->m_ResampleIntZ->value()); resampler->SetNewImageSize(newRegion); break; } default: { MITK_WARN << "Unknown resampling parameters!"; return; } } QString outAdd; switch (m_Controls->m_InterpolatorBox->currentIndex()) { case 0: { resampler->SetInterpolation(ResampleFilter::Interpolate_NearestNeighbour); outAdd = "NearestNeighbour"; break; } case 1: { resampler->SetInterpolation(ResampleFilter::Interpolate_Linear); outAdd = "Linear"; break; } case 2: { resampler->SetInterpolation(ResampleFilter::Interpolate_BSpline); outAdd = "BSpline"; break; } case 3: { resampler->SetInterpolation(ResampleFilter::Interpolate_WindowedSinc); outAdd = "WindowedSinc"; break; } default: { resampler->SetInterpolation(ResampleFilter::Interpolate_NearestNeighbour); outAdd = "NearestNeighbour"; } } resampler->Update(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( resampler->GetOutput() ); PropHelper::CopyProperties(image, newImage, false); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_resampled_"+outAdd).toStdString().c_str()); imageNode->SetVisibility(false); GetDataStorage()->Add(imageNode, node); } else if( image->GetPixelType().GetNumberOfComponents() ) { AccessFixedDimensionByItk(image, TemplatedResampleImage,3); } else { QMessageBox::warning(nullptr,"Warning", QString("Operation not supported in multi-component images") ); } } template < typename TPixel, unsigned int VImageDimension > void QmitkPreprocessingView::TemplatedResampleImage( itk::Image* itkImage) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } itk::Vector< double, 3 > newSpacing; itk::ImageRegion<3> newRegion; switch (m_Controls->m_ResampleTypeBox->currentIndex()) { case 0: { itk::Vector< double, 3 > sampling; sampling[0] = m_Controls->m_ResampleDoubleX->value(); sampling[1] = m_Controls->m_ResampleDoubleY->value(); sampling[2] = m_Controls->m_ResampleDoubleZ->value(); newSpacing = itkImage->GetSpacing(); newSpacing[0] /= sampling[0]; newSpacing[1] /= sampling[1]; newSpacing[2] /= sampling[2]; newRegion = itkImage->GetLargestPossibleRegion(); newRegion.SetSize(0, newRegion.GetSize(0)*sampling[0]); newRegion.SetSize(1, newRegion.GetSize(1)*sampling[1]); newRegion.SetSize(2, newRegion.GetSize(2)*sampling[2]); break; } case 1: { newSpacing[0] = m_Controls->m_ResampleDoubleX->value(); newSpacing[1] = m_Controls->m_ResampleDoubleY->value(); newSpacing[2] = m_Controls->m_ResampleDoubleZ->value(); itk::Vector< double, 3 > oldSpacing = itkImage->GetSpacing(); itk::Vector< double, 3 > sampling; sampling[0] = oldSpacing[0]/newSpacing[0]; sampling[1] = oldSpacing[1]/newSpacing[1]; sampling[2] = oldSpacing[2]/newSpacing[2]; newRegion = itkImage->GetLargestPossibleRegion(); newRegion.SetSize(0, newRegion.GetSize(0)*sampling[0]); newRegion.SetSize(1, newRegion.GetSize(1)*sampling[1]); newRegion.SetSize(2, newRegion.GetSize(2)*sampling[2]); break; } case 2: { newRegion.SetSize(0, m_Controls->m_ResampleIntX->value()); newRegion.SetSize(1, m_Controls->m_ResampleIntY->value()); newRegion.SetSize(2, m_Controls->m_ResampleIntZ->value()); itk::ImageRegion<3> oldRegion = itkImage->GetLargestPossibleRegion(); itk::Vector< double, 3 > sampling; sampling[0] = (double)newRegion.GetSize(0)/oldRegion.GetSize(0); sampling[1] = (double)newRegion.GetSize(1)/oldRegion.GetSize(1); sampling[2] = (double)newRegion.GetSize(2)/oldRegion.GetSize(2); newSpacing = itkImage->GetSpacing(); newSpacing[0] /= sampling[0]; newSpacing[1] /= sampling[1]; newSpacing[2] /= sampling[2]; break; } default: { MITK_WARN << "Unknown resampling parameters!"; return; } } itk::Point origin = itkImage->GetOrigin(); origin[0] -= itkImage->GetSpacing()[0]/2; origin[1] -= itkImage->GetSpacing()[1]/2; origin[2] -= itkImage->GetSpacing()[2]/2; origin[0] += newSpacing[0]/2; origin[1] += newSpacing[1]/2; origin[2] += newSpacing[2]/2; typedef itk::Image ImageType; typename ImageType::Pointer outImage = ImageType::New(); outImage->SetSpacing( newSpacing ); outImage->SetOrigin( origin ); outImage->SetDirection( itkImage->GetDirection() ); outImage->SetLargestPossibleRegion( newRegion ); outImage->SetBufferedRegion( newRegion ); outImage->SetRequestedRegion( newRegion ); outImage->Allocate(); typedef itk::ResampleImageFilter ResampleFilter; typename ResampleFilter::Pointer resampler = ResampleFilter::New(); resampler->SetInput(itkImage); resampler->SetOutputParametersFromImage(outImage); QString outAdd; switch (m_Controls->m_InterpolatorBox->currentIndex()) { case 0: { typename itk::NearestNeighborInterpolateImageFunction::Pointer interp = itk::NearestNeighborInterpolateImageFunction::New(); resampler->SetInterpolator(interp); outAdd = "NearestNeighbour"; break; } case 1: { typename itk::LinearInterpolateImageFunction::Pointer interp = itk::LinearInterpolateImageFunction::New(); resampler->SetInterpolator(interp); outAdd = "Linear"; break; } case 2: { typename itk::BSplineInterpolateImageFunction::Pointer interp = itk::BSplineInterpolateImageFunction::New(); resampler->SetInterpolator(interp); outAdd = "BSpline"; break; } case 3: { typename itk::WindowedSincInterpolateImageFunction::Pointer interp = itk::WindowedSincInterpolateImageFunction::New(); resampler->SetInterpolator(interp); outAdd = "WindowedSinc"; break; } default: { typename itk::NearestNeighborInterpolateImageFunction::Pointer interp = itk::NearestNeighborInterpolateImageFunction::New(); resampler->SetInterpolator(interp); outAdd = "NearestNeighbour"; } } resampler->Update(); mitk::Image::Pointer image = mitk::Image::New(); image->InitializeByItk( resampler->GetOutput() ); image->SetVolume( resampler->GetOutput()->GetBufferPointer() ); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( image ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_resampled_"+outAdd).toStdString().c_str()); GetDataStorage()->Add(imageNode, node); } void QmitkPreprocessingView::DoApplyHeader() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); bool isDti = false; bool isOdf = false; bool isPeak = false; if (!isDiffusionImage) { if ( dynamic_cast(node->GetData()) ) isDti = true; else if ( dynamic_cast(node->GetData()) ) isOdf = true; else if ( dynamic_cast(node->GetData()) ) isPeak = true; } mitk::Image::Pointer newImage = image->Clone(); mitk::Vector3D spacing; spacing[0] = m_Controls->m_HeaderSpacingX->value(); spacing[1] = m_Controls->m_HeaderSpacingY->value(); spacing[2] = m_Controls->m_HeaderSpacingZ->value(); newImage->GetGeometry()->SetSpacing( spacing ); mitk::Point3D origin; origin[0] = m_Controls->m_HeaderOriginX->value(); origin[1] = m_Controls->m_HeaderOriginY->value(); origin[2] = m_Controls->m_HeaderOriginZ->value(); newImage->GetGeometry()->SetOrigin(origin); vtkSmartPointer< vtkMatrix4x4 > matrix = vtkSmartPointer< vtkMatrix4x4 >::New(); matrix->SetElement(0,3,newImage->GetGeometry()->GetOrigin()[0]); matrix->SetElement(1,3,newImage->GetGeometry()->GetOrigin()[1]); matrix->SetElement(2,3,newImage->GetGeometry()->GetOrigin()[2]); for (int r=0; r<3; r++) { for (int c=0; c<3; c++) { QTableWidgetItem* item = m_Controls->m_DirectionMatrixTable->item(r,c); if (!item) continue; matrix->SetElement(r,c,item->text().toDouble()); } } newImage->GetGeometry()->SetIndexToWorldTransformByVtkMatrixWithoutChangingSpacing(matrix); if ( isDiffusionImage ) { vnl_matrix_fixed< double, 3, 3 > mf; for (int r=0; r<3; r++) { for (int c=0; c<3; c++) { QTableWidgetItem* item = m_Controls->m_MeasurementFrameTable->item(r,c); if (!item) continue; mf[r][c] = item->text().toDouble(); } } newImage->GetPropertyList()->ReplaceProperty( PropHelper::MEASUREMENTFRAMEPROPERTYNAME.c_str(), mitk::MeasurementFrameProperty::New( mf ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); } mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); if (isOdf) { mitk::OdfImage::ItkOdfImageType::Pointer itk_img = mitk::OdfImage::ItkOdfImageType::New(); mitk::CastToItkImage(newImage, itk_img); mitk::Image::Pointer odfImage = dynamic_cast(mitk::OdfImage::New().GetPointer()); mitk::CastToMitkImage(itk_img, odfImage); odfImage->SetVolume(itk_img->GetBufferPointer()); imageNode->SetData( odfImage ); } else if (isDti) { mitk::TensorImage::ItkTensorImageType::Pointer itk_img = mitk::ImageToItkImage(newImage); mitk::Image::Pointer tensorImage = dynamic_cast(mitk::TensorImage::New().GetPointer()); mitk::CastToMitkImage(itk_img, tensorImage); tensorImage->SetVolume(itk_img->GetBufferPointer()); imageNode->SetData( tensorImage ); } else if (isPeak) { mitk::PeakImage::ItkPeakImageType::Pointer itk_img = mitk::ImageToItkImage(newImage); mitk::Image::Pointer peakImage = dynamic_cast(mitk::PeakImage::New().GetPointer()); mitk::CastToMitkImage(itk_img, peakImage); peakImage->SetVolume(itk_img->GetBufferPointer()); imageNode->SetData( peakImage ); } else imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_newheader").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); mitk::RenderingManager::GetInstance()->InitializeViews( imageNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } void QmitkPreprocessingView::DoProjectSignal() { switch(m_Controls->m_ProjectionMethodBox->currentIndex()) { case 0: DoADCAverage(); break; case 1: DoAKCFit(); break; case 2: DoBiExpFit(); break; default: DoADCAverage(); } } void QmitkPreprocessingView::DoDwiNormalization() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( ! isDiffusionImage ) { return; } GradientDirectionContainerType::Pointer gradientContainer = static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); int b0Index = -1; for (unsigned int i=0; isize(); i++) { GradientDirectionType g = gradientContainer->GetElement(i); if (g.magnitude()<0.001) { b0Index = i; break; } } if (b0Index==-1) { return; } typedef itk::DwiNormilzationFilter FilterType; ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkVectorImagePointer ); filter->SetGradientDirections( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); filter->SetNewMean(m_Controls->m_NewMean->value()); filter->SetNewStdev(m_Controls->m_NewStdev->value()); UcharImageType::Pointer itkImage = nullptr; if (m_Controls->m_NormalizationMaskBox->GetSelectedNode().IsNotNull()) { itkImage = UcharImageType::New(); if ( dynamic_cast(m_Controls->m_NormalizationMaskBox->GetSelectedNode()->GetData()) != nullptr ) { mitk::CastToItkImage( dynamic_cast(m_Controls->m_NormalizationMaskBox->GetSelectedNode()->GetData()), itkImage ); } filter->SetMaskImage(itkImage); } filter->Update(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( filter->GetOutput() ); PropHelper::CopyProperties(image, newImage, false); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_normalized").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); } void QmitkPreprocessingView::DoLengthCorrection() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( ! isDiffusionImage ) { return; } typedef itk::DwiGradientLengthCorrectionFilter FilterType; ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); FilterType::Pointer filter = FilterType::New(); filter->SetRoundingValue( m_Controls->m_B_ValueMap_Rounder_SpinBox->value()); filter->SetReferenceBValue( static_cast (image->GetProperty(PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str()).GetPointer() ) ->GetValue() ); filter->SetReferenceGradientDirectionContainer( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); filter->Update(); mitk::Image::Pointer newImage = mitk::Image::New(); newImage->InitializeByItk( itkVectorImagePointer.GetPointer() ); newImage->SetImportVolume( itkVectorImagePointer->GetBufferPointer(), 0, 0, mitk::Image::CopyMemory); itkVectorImagePointer->GetPixelContainer()->ContainerManageMemoryOff(); PropHelper::CopyProperties(image, newImage, true); newImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( filter->GetOutputGradientDirectionContainer() ) ); newImage->GetPropertyList()->ReplaceProperty( PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str(), mitk::FloatProperty::New( filter->GetNewBValue() ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_rounded").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); } void QmitkPreprocessingView::UpdateDwiBValueMapRounder(int i) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(node) ); if ( ! isDiffusionImage ) { return; } UpdateBValueTableWidget(i); } void QmitkPreprocessingView:: CallMultishellToSingleShellFilter( itk::DWIVoxelFunctor * functor, mitk::Image::Pointer image, QString imageName, mitk::DataNode* parent ) { typedef itk::RadialMultishellToSingleshellImageFilter FilterType; // filter input parameter const mitk::BValueMapProperty::BValueMap& originalShellMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); ItkDwiType* vectorImage = itkVectorImagePointer.GetPointer(); const GradProp::GradientDirectionsContainerType::Pointer gradientContainer = static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); const unsigned int& bValue = static_cast (image->GetProperty(PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str()).GetPointer() ) ->GetValue(); mitk::DataNode::Pointer imageNode = 0; // filter call FilterType::Pointer filter = FilterType::New(); filter->SetInput(vectorImage); filter->SetOriginalGradientDirections(gradientContainer); filter->SetOriginalBValueMap(originalShellMap); filter->SetOriginalBValue(bValue); filter->SetFunctor(functor); filter->Update(); // create new DWI image mitk::Image::Pointer outImage = mitk::GrabItkImageMemory( filter->GetOutput() ); PropHelper::CopyProperties(image, outImage, true); outImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( filter->GetTargetGradientDirections() ) ); outImage->GetPropertyList()->ReplaceProperty( PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str(), mitk::FloatProperty::New( m_Controls->m_targetBValueSpinBox->value() ) ); PropHelper propertyHelper( outImage ); propertyHelper.InitializeImage(); imageNode = mitk::DataNode::New(); imageNode->SetData( outImage ); imageNode->SetName(imageName.toStdString().c_str()); GetDataStorage()->Add(imageNode, parent); // if(m_Controls->m_OutputRMSErrorImage->isChecked()){ // // create new Error image // FilterType::ErrorImageType::Pointer errImage = filter->GetErrorImage(); // mitk::Image::Pointer mitkErrImage = mitk::Image::New(); // mitkErrImage->InitializeByItk(errImage); // mitkErrImage->SetVolume(errImage->GetBufferPointer()); // imageNode = mitk::DataNode::New(); // imageNode->SetData( mitkErrImage ); // imageNode->SetName((imageName+"_Error").toStdString().c_str()); // GetDataStorage()->Add(imageNode); // } } void QmitkPreprocessingView::DoBiExpFit() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( ! isDiffusionImage ) { return; } itk::BiExpFitFunctor::Pointer functor = itk::BiExpFitFunctor::New(); QString name(node->GetName().c_str()); const mitk::BValueMapProperty::BValueMap& originalShellMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); mitk::BValueMapProperty::BValueMap::const_iterator it = originalShellMap.begin(); ++it;/* skip b=0*/ unsigned int s = 0; /*shell index */ vnl_vector bValueList(originalShellMap.size()-1); while( it != originalShellMap.end() ) { bValueList.put(s++,(it++)->first); } const double targetBValue = m_Controls->m_targetBValueSpinBox->value(); functor->setListOfBValues(bValueList); functor->setTargetBValue(targetBValue); CallMultishellToSingleShellFilter(functor,image,name + "_BiExp", node); } void QmitkPreprocessingView::DoAKCFit() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( ! isDiffusionImage ) { return; } itk::KurtosisFitFunctor::Pointer functor = itk::KurtosisFitFunctor::New(); QString name(node->GetName().c_str()); const mitk::BValueMapProperty::BValueMap& originalShellMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); mitk::BValueMapProperty::BValueMap::const_iterator it = originalShellMap.begin(); ++it;/* skip b=0*/ unsigned int s = 0; /*shell index */ vnl_vector bValueList(originalShellMap.size()-1); while(it != originalShellMap.end()) bValueList.put(s++,(it++)->first); const double targetBValue = m_Controls->m_targetBValueSpinBox->value(); functor->setListOfBValues(bValueList); functor->setTargetBValue(targetBValue); CallMultishellToSingleShellFilter(functor,image,name + "_AKC", node); } void QmitkPreprocessingView::DoADCFit() { // later } void QmitkPreprocessingView::DoADCAverage() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( ! isDiffusionImage ) return; itk::ADCAverageFunctor::Pointer functor = itk::ADCAverageFunctor::New(); QString name(node->GetName().c_str()); const mitk::BValueMapProperty::BValueMap &originalShellMap = static_cast(image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() )->GetBValueMap(); mitk::BValueMapProperty::BValueMap::const_iterator it = originalShellMap.begin(); ++it;/* skip b=0*/ unsigned int s = 0; /*shell index */ vnl_vector bValueList(originalShellMap.size()-1); while(it != originalShellMap.end()) bValueList.put(s++,(it++)->first); const double targetBValue = m_Controls->m_targetBValueSpinBox->value(); functor->setListOfBValues(bValueList); functor->setTargetBValue(targetBValue); CallMultishellToSingleShellFilter(functor,image,name + "_ADC", node); } void QmitkPreprocessingView::CleanBValueTableWidget() { m_Controls->m_B_ValueMap_TableWidget->clear(); m_Controls->m_B_ValueMap_TableWidget->setRowCount(1); QStringList headerList; headerList << "b-Value" << "Number of gradients"; m_Controls->m_B_ValueMap_TableWidget->setHorizontalHeaderLabels(headerList); m_Controls->m_B_ValueMap_TableWidget->setItem(0,0,new QTableWidgetItem("-")); m_Controls->m_B_ValueMap_TableWidget->setItem(0,1,new QTableWidgetItem("-")); } void QmitkPreprocessingView::UpdateBValueTableWidget(int) { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { CleanBValueTableWidget(); return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage(false); isDiffusionImage = PropHelper::IsDiffusionWeightedImage(image); if ( ! isDiffusionImage ) { CleanBValueTableWidget(); } else { typedef mitk::BValueMapProperty::BValueMap BValueMap; typedef mitk::BValueMapProperty::BValueMap::iterator BValueMapIterator; BValueMapIterator it; BValueMap roundedBValueMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); m_Controls->m_B_ValueMap_TableWidget->clear(); m_Controls->m_B_ValueMap_TableWidget->setRowCount(roundedBValueMap.size() ); QStringList headerList; headerList << "b-Value" << "Number of gradients"; m_Controls->m_B_ValueMap_TableWidget->setHorizontalHeaderLabels(headerList); int i = 0 ; for(it = roundedBValueMap.begin() ;it != roundedBValueMap.end(); it++) { m_Controls->m_B_ValueMap_TableWidget->setItem(i,0,new QTableWidgetItem(QString::number(it->first))); QTableWidgetItem* item = m_Controls->m_B_ValueMap_TableWidget->item(i,0); item->setFlags(item->flags() & ~Qt::ItemIsEditable); m_Controls->m_B_ValueMap_TableWidget->setItem(i,1,new QTableWidgetItem(QString::number(it->second.size()))); i++; } } } void QmitkPreprocessingView::OnSelectionChanged(berry::IWorkbenchPart::Pointer , const QList& nodes) { (void) nodes; this->OnImageSelectionChanged(); } void QmitkPreprocessingView::OnImageSelectionChanged() { for (int r=0; r<3; r++) for (int c=0; c<3; c++) { { QTableWidgetItem* item = m_Controls->m_MeasurementFrameTable->item( r, c ); delete item; item = new QTableWidgetItem(); m_Controls->m_MeasurementFrameTable->setItem( r, c, item ); } { QTableWidgetItem* item = m_Controls->m_DirectionMatrixTable->item( r, c ); delete item; item = new QTableWidgetItem(); m_Controls->m_DirectionMatrixTable->setItem( r, c, item ); } } bool foundImageVolume = true; mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } bool foundDwiVolume( PropHelper::IsDiffusionWeightedImage( node ) ); mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool multiComponentVolume = (image->GetPixelType().GetNumberOfComponents() > 1); bool threeDplusTVolume = (image->GetTimeSteps() > 1); m_Controls->m_ButtonAverageGradients->setEnabled(foundDwiVolume); m_Controls->m_ButtonExtractB0->setEnabled(foundDwiVolume); m_Controls->m_CheckExtractAll->setEnabled(foundDwiVolume); m_Controls->m_MeasurementFrameTable->setEnabled(foundDwiVolume); m_Controls->m_ReduceGradientsButton->setEnabled(foundDwiVolume); m_Controls->m_ShowGradientsButton->setEnabled(foundDwiVolume); m_Controls->m_MirrorGradientToHalfSphereButton->setEnabled(foundDwiVolume); m_Controls->m_MergeDwisButton->setEnabled(foundDwiVolume); m_Controls->m_B_ValueMap_Rounder_SpinBox->setEnabled(foundDwiVolume); m_Controls->m_ProjectSignalButton->setEnabled(foundDwiVolume); m_Controls->m_CreateLengthCorrectedDwi->setEnabled(foundDwiVolume); m_Controls->m_targetBValueSpinBox->setEnabled(foundDwiVolume); m_Controls->m_NormalizeImageValuesButton->setEnabled(foundDwiVolume); m_Controls->m_RemoveGradientButton->setEnabled(foundDwiVolume); m_Controls->m_ExtractGradientButton->setEnabled(foundDwiVolume); m_Controls->m_FlipGradientsButton->setEnabled(foundDwiVolume); m_Controls->m_ClearRotationButton->setEnabled(foundDwiVolume); m_Controls->m_DirectionMatrixTable->setEnabled(foundImageVolume); m_Controls->m_ModifyHeader->setEnabled(foundImageVolume); m_Controls->m_AlignImageBox->setEnabled(foundImageVolume); // we do not support multi-component and 3D+t images for certain operations bool foundSingleImageVolume = foundDwiVolume || (foundImageVolume && !(multiComponentVolume || threeDplusTVolume)); m_Controls->m_FlipAxis->setEnabled(foundSingleImageVolume); m_Controls->m_CropImageButton->setEnabled(foundSingleImageVolume); m_Controls->m_ExtractBrainMask->setEnabled(foundSingleImageVolume); m_Controls->m_ResampleImageButton->setEnabled(foundSingleImageVolume); // reset sampling frame to 1 and update all ealted components m_Controls->m_B_ValueMap_Rounder_SpinBox->setValue(1); UpdateBValueTableWidget(m_Controls->m_B_ValueMap_Rounder_SpinBox->value()); DoUpdateInterpolationGui(m_Controls->m_ResampleTypeBox->currentIndex()); m_Controls->m_HeaderSpacingX->setValue(image->GetGeometry()->GetSpacing()[0]); m_Controls->m_HeaderSpacingY->setValue(image->GetGeometry()->GetSpacing()[1]); m_Controls->m_HeaderSpacingZ->setValue(image->GetGeometry()->GetSpacing()[2]); m_Controls->m_HeaderOriginX->setValue(image->GetGeometry()->GetOrigin()[0]); m_Controls->m_HeaderOriginY->setValue(image->GetGeometry()->GetOrigin()[1]); m_Controls->m_HeaderOriginZ->setValue(image->GetGeometry()->GetOrigin()[2]); m_Controls->m_XstartBox->setMaximum(image->GetGeometry()->GetExtent(0)-1); m_Controls->m_YstartBox->setMaximum(image->GetGeometry()->GetExtent(1)-1); m_Controls->m_ZstartBox->setMaximum(image->GetGeometry()->GetExtent(2)-1); m_Controls->m_XendBox->setMaximum(image->GetGeometry()->GetExtent(0)-1); m_Controls->m_YendBox->setMaximum(image->GetGeometry()->GetExtent(1)-1); m_Controls->m_ZendBox->setMaximum(image->GetGeometry()->GetExtent(2)-1); for (int r=0; r<3; r++) for (int c=0; c<3; c++) { // Direction matrix QTableWidgetItem* item = m_Controls->m_DirectionMatrixTable->item( r, c ); delete item; item = new QTableWidgetItem(); item->setTextAlignment(Qt::AlignCenter | Qt::AlignVCenter); double val = image->GetGeometry()->GetVtkMatrix()->GetElement(r,c)/image->GetGeometry()->GetSpacing()[c]; item->setText(QString::number(val)); m_Controls->m_DirectionMatrixTable->setItem( r, c, item ); } if (foundDwiVolume) { m_Controls->m_InputData->setTitle("Input Data"); vnl_matrix_fixed< double, 3, 3 > mf = static_cast (image->GetProperty(PropHelper::MEASUREMENTFRAMEPROPERTYNAME.c_str()).GetPointer() ) ->GetMeasurementFrame(); for (int r=0; r<3; r++) for (int c=0; c<3; c++) { // Measurement frame QTableWidgetItem* item = m_Controls->m_MeasurementFrameTable->item( r, c ); delete item; item = new QTableWidgetItem(); item->setTextAlignment(Qt::AlignCenter | Qt::AlignVCenter); item->setText(QString::number(mf.get(r,c))); m_Controls->m_MeasurementFrameTable->setItem( r, c, item ); } //calculate target bValue for MultishellToSingleShellfilter const mitk::BValueMapProperty::BValueMap & bValMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); mitk::BValueMapProperty::BValueMap::const_iterator it = bValMap.begin(); unsigned int targetBVal = 0; while(it != bValMap.end()) { targetBVal += (it++)->first; } targetBVal /= (float)bValMap.size()-1; m_Controls->m_targetBValueSpinBox->setValue(targetBVal); m_Controls->m_RemoveGradientBox->setMaximum(static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer()->Size()-1); m_Controls->m_ExtractGradientBox->setMaximum(static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer()->Size()-1); } } void QmitkPreprocessingView::Activated() { } void QmitkPreprocessingView::Deactivated() { OnImageSelectionChanged(); } void QmitkPreprocessingView::Visible() { OnImageSelectionChanged(); } void QmitkPreprocessingView::Hidden() { } void QmitkPreprocessingView::DoClearRotationOfGradients() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) return; mitk::Image::Pointer image = dynamic_cast(node->GetData()); if (image == nullptr) return; if(!PropHelper::IsDiffusionWeightedImage(image)) return; mitk::Image::Pointer newDwi = image->Clone(); PropHelper propertyHelper( newDwi ); propertyHelper.InitializeImage(); PropHelper::ClearMeasurementFrameAndRotationMatrixFromGradients(newDwi); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newDwi ); QString name = node->GetName().c_str(); imageNode->SetName( (name+"_OriginalGradients").toStdString().c_str() ); GetDataStorage()->Add( imageNode, node ); } void QmitkPreprocessingView::DoFlipGradientDirections() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } mitk::Image::Pointer newDwi = image->Clone(); GradientDirectionContainerType::Pointer gradientContainer = static_cast ( newDwi->GetProperty(PropHelper::ORIGINALGRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); for (unsigned int j=0; jSize(); j++) { if (m_Controls->m_FlipGradBoxX->isChecked()) { gradientContainer->at(j)[0] *= -1; } if (m_Controls->m_FlipGradBoxY->isChecked()) { gradientContainer->at(j)[1] *= -1; } if (m_Controls->m_FlipGradBoxZ->isChecked()) { gradientContainer->at(j)[2] *= -1; } } PropHelper::CopyProperties(image, newDwi, true); newDwi->GetPropertyList()->ReplaceProperty( PropHelper::ORIGINALGRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( gradientContainer ) ); PropHelper propertyHelper( newDwi ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newDwi ); QString name = node->GetName().c_str(); imageNode->SetName( (name+"_GradientFlip").toStdString().c_str() ); GetDataStorage()->Add( imageNode, node ); } void QmitkPreprocessingView::DoHalfSphereGradientDirections() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } mitk::Image::Pointer newDwi = image->Clone(); GradientDirectionContainerType::Pointer gradientContainer = static_cast ( newDwi->GetProperty(PropHelper::ORIGINALGRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); for (unsigned int j=0; jSize(); j++) { if (gradientContainer->at(j)[0]<0) { gradientContainer->at(j) = -gradientContainer->at(j); } } PropHelper::CopyProperties(image, newDwi, true); newDwi->GetPropertyList()->ReplaceProperty( PropHelper::ORIGINALGRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( gradientContainer ) ); PropHelper propertyHelper( newDwi ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newDwi ); QString name = node->GetName().c_str(); imageNode->SetName( (name+"_halfsphere").toStdString().c_str() ); GetDataStorage()->Add( imageNode, node ); } void QmitkPreprocessingView::DoShowGradientDirections() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } int maxIndex = 0; unsigned int maxSize = image->GetDimension(0); if (maxSizeGetDimension(1)) { maxSize = image->GetDimension(1); maxIndex = 1; } if (maxSizeGetDimension(2)) { maxSize = image->GetDimension(2); maxIndex = 2; } mitk::Point3D origin = image->GetGeometry()->GetOrigin(); mitk::PointSet::Pointer originSet = mitk::PointSet::New(); typedef mitk::BValueMapProperty::BValueMap BValueMap; typedef mitk::BValueMapProperty::BValueMap::iterator BValueMapIterator; BValueMap bValMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); GradientDirectionContainerType::Pointer gradientContainer = static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); mitk::BaseGeometry::Pointer geometry = image->GetGeometry(); int shellCount = 1; for(BValueMapIterator it = bValMap.begin(); it!=bValMap.end(); ++it) { mitk::PointSet::Pointer pointset = mitk::PointSet::New(); for (unsigned int j=0; jsecond.size(); j++) { mitk::Point3D ip; vnl_vector_fixed< double, 3 > v = gradientContainer->at(it->second[j]); if (v.magnitude()>mitk::eps) { ip[0] = v[0]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[0]-0.5*geometry->GetSpacing()[0] + geometry->GetSpacing()[0]*image->GetDimension(0)/2; ip[1] = v[1]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[1]-0.5*geometry->GetSpacing()[1] + geometry->GetSpacing()[1]*image->GetDimension(1)/2; ip[2] = v[2]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[2]-0.5*geometry->GetSpacing()[2] + geometry->GetSpacing()[2]*image->GetDimension(2)/2; pointset->InsertPoint(j, ip); } else if (originSet->IsEmpty()) { ip[0] = v[0]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[0]-0.5*geometry->GetSpacing()[0] + geometry->GetSpacing()[0]*image->GetDimension(0)/2; ip[1] = v[1]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[1]-0.5*geometry->GetSpacing()[1] + geometry->GetSpacing()[1]*image->GetDimension(1)/2; ip[2] = v[2]*maxSize*geometry->GetSpacing()[maxIndex]/2 + origin[2]-0.5*geometry->GetSpacing()[2] + geometry->GetSpacing()[2]*image->GetDimension(2)/2; originSet->InsertPoint(j, ip); } } if ( it->first < mitk::eps ) { continue; } // add shell to datastorage mitk::DataNode::Pointer newNode = mitk::DataNode::New(); newNode->SetData(pointset); QString name = node->GetName().c_str(); name += "_Shell_"; name += QString::number( it->first ); newNode->SetName( name.toStdString().c_str() ); newNode->SetProperty( "pointsize", mitk::FloatProperty::New((float)maxSize / 50) ); int b0 = shellCount % 2; int b1 = 0; int b2 = 0; if (shellCount>4) { b2 = 1; } if (shellCount%4 >= 2) { b1 = 1; } newNode->SetProperty("color", mitk::ColorProperty::New( b2, b1, b0 )); GetDataStorage()->Add( newNode, node ); shellCount++; } // add origin to datastorage mitk::DataNode::Pointer newNode = mitk::DataNode::New(); newNode->SetData(originSet); QString name = node->GetName().c_str(); name += "_Origin"; newNode->SetName(name.toStdString().c_str()); newNode->SetProperty("pointsize", mitk::FloatProperty::New((float)maxSize/50)); newNode->SetProperty("color", mitk::ColorProperty::New(1,1,1)); GetDataStorage()->Add(newNode, node); } void QmitkPreprocessingView::DoReduceGradientDirections() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } typedef itk::ElectrostaticRepulsionDiffusionGradientReductionFilter FilterType; typedef mitk::BValueMapProperty::BValueMap BValueMap; // GetShellSelection from GUI BValueMap shellSlectionMap; BValueMap originalShellMap = static_cast (image->GetProperty(PropHelper::BVALUEMAPPROPERTYNAME.c_str()).GetPointer() ) ->GetBValueMap(); std::vector newNumGradientDirections; int shellCounter = 0; QString name = node->GetName().c_str(); for (int i=0; im_B_ValueMap_TableWidget->rowCount(); i++) { double BValue = m_Controls->m_B_ValueMap_TableWidget->item(i,0)->text().toDouble(); shellSlectionMap[BValue] = originalShellMap[BValue]; unsigned int num = m_Controls->m_B_ValueMap_TableWidget->item(i,1)->text().toUInt(); newNumGradientDirections.push_back(num); name += "_"; name += QString::number(num); shellCounter++; } if (newNumGradientDirections.empty()) { return; } GradientDirectionContainerType::Pointer gradientContainer = static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer(); ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkVectorImagePointer ); filter->SetOriginalGradientDirections(gradientContainer); filter->SetNumGradientDirections(newNumGradientDirections); filter->SetOriginalBValueMap(originalShellMap); filter->SetShellSelectionBValueMap(shellSlectionMap); filter->Update(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( filter->GetOutput() ); PropHelper::CopyProperties(image, newImage, true); newImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( filter->GetGradientDirections() ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); imageNode->SetName(name.toStdString().c_str()); GetDataStorage()->Add(imageNode, node); // update the b-value widget to remove the modified number of gradients used for extraction this->CleanBValueTableWidget(); this->UpdateBValueTableWidget(0); } void QmitkPreprocessingView::MergeDwis() { typedef GradProp::GradientDirectionsContainerType GradientContainerType; mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } mitk::DataNode::Pointer node2 = m_Controls->m_MergeDwiBox->GetSelectedNode(); if (node2.IsNull()) { return; } mitk::Image::Pointer image2 = dynamic_cast(node2->GetData()); if ( image2 == nullptr ) { return; } typedef itk::VectorImage DwiImageType; typedef std::vector< DwiImageType::Pointer > DwiImageContainerType; typedef std::vector< GradientContainerType::Pointer > GradientListContainerType; DwiImageContainerType imageContainer; GradientListContainerType gradientListContainer; std::vector< double > bValueContainer; QString name = ""; { ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); imageContainer.push_back( itkVectorImagePointer ); gradientListContainer.push_back( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); bValueContainer.push_back( static_cast (image->GetProperty(PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str()).GetPointer() ) ->GetValue() ); name += node->GetName().c_str(); } { ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image2, itkVectorImagePointer); imageContainer.push_back( itkVectorImagePointer ); gradientListContainer.push_back( static_cast ( image2->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); bValueContainer.push_back( static_cast (image2->GetProperty(PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str()).GetPointer() ) ->GetValue() ); name += "+"; name += node2->GetName().c_str(); } typedef itk::MergeDiffusionImagesFilter FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetImageVolumes(imageContainer); filter->SetGradientLists(gradientListContainer); filter->SetBValues(bValueContainer); filter->Update(); vnl_matrix_fixed< double, 3, 3 > mf; mf.set_identity(); mitk::Image::Pointer newImage = mitk::GrabItkImageMemory( filter->GetOutput() ); newImage->GetPropertyList()->ReplaceProperty( PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), GradProp::New( filter->GetOutputGradients() ) ); newImage->GetPropertyList()->ReplaceProperty( PropHelper::MEASUREMENTFRAMEPROPERTYNAME.c_str(), mitk::MeasurementFrameProperty::New( mf ) ); newImage->GetPropertyList()->ReplaceProperty( PropHelper::REFERENCEBVALUEPROPERTYNAME.c_str(), mitk::FloatProperty::New( filter->GetB_Value() ) ); PropHelper propertyHelper( newImage ); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newImage ); imageNode->SetName(name.toStdString().c_str()); GetDataStorage()->Add(imageNode); } void QmitkPreprocessingView::ExtractB0() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } // call the extraction withou averaging if the check-box is checked if( this->m_Controls->m_CheckExtractAll->isChecked() ) { DoExtractBOWithoutAveraging(); return; } ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); // Extract image using found index typedef itk::B0ImageExtractionImageFilter FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkVectorImagePointer ); filter->SetDirections( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); filter->Update(); mitk::Image::Pointer mitkImage = mitk::Image::New(); mitkImage->InitializeByItk( filter->GetOutput() ); mitkImage->SetVolume( filter->GetOutput()->GetBufferPointer() ); mitk::DataNode::Pointer newNode=mitk::DataNode::New(); newNode->SetData( mitkImage ); newNode->SetProperty( "name", mitk::StringProperty::New(node->GetName() + "_B0")); GetDataStorage()->Add(newNode, node); } void QmitkPreprocessingView::DoExtractBOWithoutAveraging() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) { return; } // typedefs typedef itk::B0ImageExtractionToSeparateImageFilter< short, short> FilterType; ItkDwiType::Pointer itkVectorImagePointer = ItkDwiType::New(); mitk::CastToItkImage(image, itkVectorImagePointer); // Extract image using found index FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkVectorImagePointer ); filter->SetDirections( static_cast ( image->GetProperty(PropHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() ) ->GetGradientDirectionsContainer() ); filter->Update(); mitk::Image::Pointer mitkImage = mitk::Image::New(); mitkImage->InitializeByItk( filter->GetOutput() ); mitkImage->SetImportChannel( filter->GetOutput()->GetBufferPointer() ); mitk::DataNode::Pointer newNode=mitk::DataNode::New(); newNode->SetData( mitkImage ); newNode->SetProperty( "name", mitk::StringProperty::New(node->GetName() + "_B0_ALL")); GetDataStorage()->Add(newNode, node); /*A reinitialization is needed to access the time channels via the ImageNavigationController The Global-Geometry can not recognize the time channel without a re-init. (for a new selection in datamanger a automatically updated of the Global-Geometry should be done - if it contains the time channel)*/ mitk::RenderingManager::GetInstance()->InitializeViews( newNode->GetData()->GetTimeGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true); } void QmitkPreprocessingView::AverageGradients() { mitk::DataNode::Pointer node = m_Controls->m_SelctedImageComboBox->GetSelectedNode(); if (node.IsNull()) { return; } mitk::Image::Pointer image = dynamic_cast(node->GetData()); if ( image == nullptr ) { return; } bool isDiffusionImage( PropHelper::IsDiffusionWeightedImage(image) ); if ( !isDiffusionImage ) return; mitk::Image::Pointer newDwi = image->Clone(); PropHelper propertyHelper(newDwi); propertyHelper.AverageRedundantGradients(m_Controls->m_Blur->value()); propertyHelper.InitializeImage(); mitk::DataNode::Pointer imageNode = mitk::DataNode::New(); imageNode->SetData( newDwi ); QString name = node->GetName().c_str(); imageNode->SetName((name+"_averaged").toStdString().c_str()); GetDataStorage()->Add(imageNode, node); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingViewControls.ui index 537943f4cd..e386ad0ad0 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/QmitkPreprocessingViewControls.ui @@ -1,1717 +1,1720 @@ QmitkPreprocessingViewControls 0 0 503 812 0 0 false QmitkPreprocessingViewControls true - - + + + 25 + + Please Select Input Data 0 0 0 0 Image: QComboBox::AdjustToMinimumContentsLength - + 0 Gradients Qt::Vertical 20 40 0 0 Qt::ScrollBarAsNeeded Qt::ScrollBarAlwaysOff true 100 true false true b-Value Number of gradients QFrame::NoFrame QFrame::Raised 0 0 0 0 6 <html><head/><body><p>Define the sampling frame the b-Values are rounded with.</p></body></html> Sampling frame: false <html><head/><body><p>Round b-values to nearest multiple of this value (click &quot;Round b-value&quot; to create new image with these values).</p></body></html> QAbstractSpinBox::CorrectToNearestValue 1 10000 10 false Sometimes the gradient directions are not located on one half sphere. Mirror gradients to half sphere false Generate pointset displaying the gradient vectors (applied measurement frame). Show gradients false Generate pointset displaying the gradient vectors (applied measurement frame). Flip gradients false Retain only the specified number of gradient directions and according image volumes. The retained directions are spread equally over the half sphere using an iterative energy repulsion strategy. Reduce number of gradients QFrame::NoFrame QFrame::Plain 0 0 0 0 0 x y z false Round b-values false By default, the image matrix is applied to the image gradients. This button removes this additional rotation. Clear rotation of gradients Remove or extract gradient volumes 6 6 0 0 0 0 false Remove gradient volume false Extract gradient volume Image Values Qt::Vertical 20 40 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. 6 2.000000000000000 0.000100000000000 0.001000000000000 Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. Accumulates the information that was acquired with multiple repetitions for one gradient. Vectors do not have to be precisely equal in order to be merged, if a "Merge radius" > 0 is configured. Merge radius false Merges selected DWIs of same dimension. If several b-values are present, the resulting image will contain multiple b-shells. Merge selected DWIs false Normalizes the diffusion-weighted image values across all weighted volumes to the given mean and standard deviation. Normalize image values QFrame::NoFrame QFrame::Raised 0 0 0 0 0 false Target b-value 100000 500 Select projection method. QComboBox::AdjustToMinimumContentsLength ADC Average AKC Bi-Exponential false Multiple acquistions of one gradient direction can be averaged. Due to rounding errors, similar gradients often differ in the last decimal positions. The Merge radius allows to average them by taking all directions within a certain radius into account. Average repetitions false Project image values onto one b-shell. Project onto shell QFrame::NoFrame QFrame::Raised 0 0 0 0 0 true New stdev 100000 100 500 Select binary mask image. The mask is used to calculate the old mean and standard deviation. QComboBox::AdjustToMinimumContentsLength true New mean value 100000 100 1000 false Merges selected DWIs of same dimension. If several b-values are present, the resulting image will contain multiple b-shells. Flip axis QFrame::NoFrame QFrame::Raised 0 0 0 0 Y Qt::Horizontal 40 20 X Z Axis: QComboBox::AdjustToMinimumContentsLength Resample image 0 0 0 0 6 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 0.010000000000000 2.000000000000000 0.010000000000000 2.000000000000000 0.010000000000000 2.000000000000000 Sampling factor New image spacing New image size QFrame::NoFrame QFrame::Raised 0 0 0 0 0 Interpolator: Nearest neighbour Linear B-spline Windowed sinc false Resample image QFrame::NoFrame QFrame::Raised 0 0 0 0 0 1 10000 1 10000 1 10000 Crop Image 0 0 0 0 6 x: y: z: Crop Image Header Voxel size 0 0 0 0 4 0.000000000000000 99.989999999999995 4 4 false Apply new header information Direction matrix 0 0 0 0 false 0 0 0 0 IBeamCursor true Qt::ScrollBarAlwaysOff Qt::ScrollBarAlwaysOff true false false true true 0 false true true New Row New Row New Row New Column New Column New Column Qt::Horizontal 40 20 0 0 Measurment frame 0 0 0 0 false 0 0 0 0 IBeamCursor true Qt::ScrollBarAlwaysOff Qt::ScrollBarAlwaysOff true false false true true 0 false true true New Row New Row New Row New Column New Column New Column Qt::Horizontal 40 20 Qt::Vertical 20 40 Origin 0 0 0 0 4 -999999999.000000000000000 999999999.000000000000000 4 -99999999.000000000000000 999999999.000000000000000 4 -999999999.000000000000000 999999999.000000000000000 Align origins 0 0 0 0 QComboBox::AdjustToMinimumContentsLength Align to Other false If multiple baseline acquisitions are present, the default behaviour is to output an averaged image. Estimate binary brain mask Maximum number of iterations. 10000 10000 Qt::Vertical 20 40 false If multiple baseline acquisitions are present, the default behaviour is to output an averaged image. Extract baseline image Create a 3D+t data set containing all b0 images as timesteps Disable averaging QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
QmitkDataStorageComboBoxWithSelectNone QComboBox
QmitkDataStorageComboBoxWithSelectNone.h
m_SelctedImageComboBox tabWidget m_B_ValueMap_TableWidget m_CreateLengthCorrectedDwi m_B_ValueMap_Rounder_SpinBox m_FlipGradientsButton m_FlipGradBoxX m_FlipGradBoxY m_FlipGradBoxZ m_ShowGradientsButton m_MirrorGradientToHalfSphereButton m_ReduceGradientsButton m_ClearRotationButton m_RemoveGradientButton m_RemoveGradientBox m_ExtractGradientButton m_ExtractGradientBox m_ButtonAverageGradients m_Blur m_ProjectSignalButton m_targetBValueSpinBox m_ProjectionMethodBox m_NormalizeImageValuesButton m_NewMean m_NewStdev m_NormalizationMaskBox m_FlipAxis m_FlipX m_FlipY m_FlipZ m_MergeDwisButton m_MergeDwiBox m_ResampleTypeBox m_ResampleDoubleX m_ResampleDoubleY m_ResampleDoubleZ m_ResampleIntX m_ResampleIntY m_ResampleIntZ m_InterpolatorBox m_ResampleImageButton m_XstartBox m_XendBox m_YstartBox m_YendBox m_ZstartBox m_ZendBox m_CropImageButton m_ModifyHeader m_HeaderOriginX m_HeaderOriginY m_HeaderOriginZ m_HeaderSpacingX m_HeaderSpacingY m_HeaderSpacingZ m_DirectionMatrixTable m_MeasurementFrameTable m_ButtonExtractB0 m_CheckExtractAll m_ExtractBrainMask m_BrainMaskIterationsBox
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/mitkPluginActivator.cpp index baf96673ff..56d175c7d5 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.preprocessing/src/internal/mitkPluginActivator.cpp @@ -1,42 +1,44 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPluginActivator.h" #include "src/internal/QmitkPreprocessingView.h" +#include "src/internal/QmitkDwiPreprocessingPerspective.h" #include ctkPluginContext* mitk::PluginActivator::m_Context = nullptr; US_INITIALIZE_MODULE ctkPluginContext* mitk::PluginActivator::GetContext() { return m_Context; } void mitk::PluginActivator::start(ctkPluginContext* context) { + BERRY_REGISTER_EXTENSION_CLASS(QmitkDwiPreprocessingPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkPreprocessingView, context) m_Context = context; } void mitk::PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) m_Context = nullptr; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.python/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging.python/files.cmake index 03078b8ef2..af3084b117 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.python/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.python/files.cmake @@ -1,42 +1,41 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp - + QmitkBrainExtractionView.cpp ) set(UI_FILES src/internal/QmitkBrainExtractionViewControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/QmitkBrainExtractionView.h ) set(CACHED_RESOURCE_FILES plugin.xml - - resources/preprocessing.png + resources/dwi2.png ) set(QRC_FILES ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.png deleted file mode 100644 index d7564ca333..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.xcf b/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.xcf deleted file mode 100644 index c7b840caf9..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.python/resources/preprocessing.xcf and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/documentation/UserManual/QmitkDiffusionImagingQuantificationPage.dox b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/documentation/UserManual/QmitkDiffusionImagingQuantificationPage.dox index 1344800441..831dc92e9d 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/documentation/UserManual/QmitkDiffusionImagingQuantificationPage.dox +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/documentation/UserManual/QmitkDiffusionImagingQuantificationPage.dox @@ -1,8 +1,7 @@ /** \page org_mitk_views_diffusionquantification Scalar Indices -The scalar indices view allows the derivation of different scalar anisotropy measures for the reconstructed tensors (Fractional Anisotropy, Relative Anisotropy, Axial Diffusivity, Radial Diffusivity) or ODFs (Generalized Fractional Anisotropy). +The scalar indices view allows the calculation of different scalar measures for raw diffusion-weighted images (MD, ADC), tensors (Fractional Anisotropy, Relative Anisotropy, Axial Diffusivity, Radial Diffusivity) or ODFs (Generalized Fractional Anisotropy). -\imageMacro{ScalarIndicesGUI.png,"Anisotropy quantification",2} */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/files.cmake index cfe817b504..a871219250 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/files.cmake @@ -1,66 +1,66 @@ set(SRC_CPP_FILES QmitkODFDetailsWidget.cpp QmitkODFRenderWidget.cpp QmitkResidualAnalysisWidget.cpp QmitkResidualViewWidget.cpp ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp Perspectives/QmitkReconstructionPerspective.cpp + Perspectives/QmitkQuantificationPerspective.cpp QmitkQBallReconstructionView.cpp QmitkDiffusionQuantificationView.cpp QmitkTensorReconstructionView.cpp QmitkODFDetailsView.cpp ) set(UI_FILES src/internal/QmitkQBallReconstructionViewControls.ui src/internal/QmitkDiffusionQuantificationViewControls.ui src/internal/QmitkTensorReconstructionViewControls.ui src/internal/QmitkODFDetailsViewControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/Perspectives/QmitkReconstructionPerspective.h + src/internal/Perspectives/QmitkQuantificationPerspective.h src/internal/QmitkQBallReconstructionView.h src/internal/QmitkDiffusionQuantificationView.h src/internal/QmitkTensorReconstructionView.h src/internal/QmitkODFDetailsView.h src/QmitkODFRenderWidget.h src/QmitkODFDetailsWidget.h src/QmitkResidualAnalysisWidget.h src/QmitkResidualViewWidget.h ) set(CACHED_RESOURCE_FILES plugin.xml resources/quantification.png resources/OdfDetails.png - resources/reconodf.png - resources/recontensor.png resources/tensor.png resources/odf.png ) set(QRC_FILES ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/plugin.xml index fa2dff4b2b..4fae3638b9 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/plugin.xml @@ -1,105 +1,112 @@ Q-Ball reconstruction view - + Calculation of tensor, ODF and raw signal scalar maps. - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/QmitkDiffusionImaging.qrc b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/QmitkDiffusionImaging.qrc index 74d6895d11..cb3bc7bf16 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/QmitkDiffusionImaging.qrc +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/QmitkDiffusionImaging.qrc @@ -1,9 +1,7 @@ tensor.png quantification.png - reconodf.png - recontensor.png odf.png diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/odf.png b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/odf.png index a89e20560d..d99423e16e 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/odf.png and b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/odf.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/reconodf.png b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/reconodf.png deleted file mode 100644 index 720eadbdc7..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/reconodf.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/recontensor.png b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/recontensor.png deleted file mode 100644 index 547ea07857..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/recontensor.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/tensor.png b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/tensor.png index 755d592fc7..22c5433a60 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/tensor.png and b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/resources/tensor.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.cpp new file mode 100644 index 0000000000..8310b75382 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.cpp @@ -0,0 +1,50 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkQuantificationPerspective.h" +#include "berryIViewLayout.h" + +void QmitkQuantificationPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) +{ + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// + + QString editorArea = layout->GetEditorArea(); + + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); + + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// + + left->AddView("org.mitk.views.diffusionquantification"); + left->AddView("org.mitk.views.imagestatistics"); + left->AddView("org.mitk.views.segmentation"); +} diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.h b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.h similarity index 64% rename from Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.h rename to Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.h index 1fda4f7c7b..8ea0b75a8a 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkQuantificationPerspective.h @@ -1,36 +1,36 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef QmitkMachineLearningTractographyPerspective_H_ -#define QmitkMachineLearningTractographyPerspective_H_ +#ifndef QmitkQuantificationPerspective_H_ +#define QmitkQuantificationPerspective_H_ #include -class QmitkMachineLearningTractographyPerspective : public QObject, public berry::IPerspectiveFactory +class QmitkQuantificationPerspective : public QObject, public berry::IPerspectiveFactory { Q_OBJECT Q_INTERFACES(berry::IPerspectiveFactory) public: - QmitkMachineLearningTractographyPerspective() {} - ~QmitkMachineLearningTractographyPerspective() {} + QmitkQuantificationPerspective() {} + ~QmitkQuantificationPerspective() {} void CreateInitialLayout(berry::IPageLayout::Pointer layout) override; }; -#endif /* QmitkMachineLearningTractographyPerspective_H_ */ +#endif /* QmitkQuantificationPerspective_H_ */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkReconstructionPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkReconstructionPerspective.cpp index 5d41035ce5..c32959dc7a 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkReconstructionPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/Perspectives/QmitkReconstructionPerspective.cpp @@ -1,52 +1,50 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkReconstructionPerspective.h" #include "berryIViewLayout.h" void QmitkReconstructionPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", - false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", - false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", - berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", - berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// - left->AddView("org.mitk.views.tensorreconstruction"); - left->AddView("org.mitk.views.qballreconstruction"); - left->AddView("org.mitk.views.diffusionquantification"); - left->AddView("org.mitk.views.diffusionpreprocessing"); - left->AddView("org.mitk.views.odfdetails"); + left->AddView("org.mitk.views.tensorreconstruction"); + left->AddView("org.mitk.views.qballreconstruction"); + left->AddView("org.mitk.views.odfmaximaextraction"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkDiffusionQuantificationViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkDiffusionQuantificationViewControls.ui index 0201599bbd..ef046f4454 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkDiffusionQuantificationViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkDiffusionQuantificationViewControls.ui @@ -1,427 +1,421 @@ QmitkDiffusionQuantificationViewControls 0 0 343 888 0 0 QmitkTemplate - - + + + 25 + + Please Select Input Data 0 0 0 0 <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> true Image Scale Image Values: 9999999.000000000000000 1.000000000000000 - + Raw diffusion-weighted image - - - 0 - + 0 0 0 0 - + false ADC - + false MD - + false Ball-Stick - + false Multi-Tensor Fit - + ODF image - - - 0 - + 0 0 0 0 - + QFrame::NoFrame QFrame::Raised 0 0 0 0 Generalized GFA QFrame::NoFrame QFrame::Raised 0 0 0 0 true k true true p true - + false GFA - + QFrame::NoFrame QFrame::Raised 0 0 0 0 Min. angle Max. angle - + false Curvature - + Tensor image - - - 0 - + 0 0 0 0 - + false FA (Fractional Anisotropy) - + false RA (Relative Anisotropy) - + false AD (Axial Diffusivity) - + false RD (Radial Diffusivity) - + false MD (Mean Diffusivity) - + false 1-(λ2+λ3)/(2*λ1) - + Qt::Vertical QSizePolicy::Expanding 20 220 QmitkDataStorageComboBox.h diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.cpp index 3a33a534ed..96fee83d4c 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.cpp @@ -1,350 +1,345 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ // Blueberry #include #include // Qmitk #include "QmitkODFDetailsView.h" #include #include #include #include #include #include #include #include #include #include #include #include const std::string QmitkODFDetailsView::VIEW_ID = "org.mitk.views.odfdetails"; QmitkODFDetailsView::QmitkODFDetailsView() : QmitkAbstractView() , m_Controls( 0 ) , m_OdfNormalization(0) , m_ImageNode(nullptr) { m_VtkActor = vtkActor::New(); m_VtkMapper = vtkPolyDataMapper::New(); m_Renderer = vtkRenderer::New(); m_VtkRenderWindow = vtkRenderWindow::New(); m_RenderWindowInteractor = vtkRenderWindowInteractor::New(); m_Camera = vtkCamera::New(); m_VtkRenderWindow->SetSize(300,300); } QmitkODFDetailsView::~QmitkODFDetailsView() { - if (m_ImageNode.IsNotNull()) - m_ImageNode->RemoveObserver( m_PropertyObserverTag ); } void QmitkODFDetailsView::Activated() { } void QmitkODFDetailsView::Deactivated() { } void QmitkODFDetailsView::Visible() { } void QmitkODFDetailsView::Hidden() { } void QmitkODFDetailsView::SetFocus() { this->m_Controls->m_OverviewTextEdit->setFocus(); } void QmitkODFDetailsView::CreateQtPartControl( QWidget *parent ) { // build up qt view, unless already done if ( !m_Controls ) { // create GUI widgets from the Qt Designer's .ui file m_Controls = new Ui::QmitkODFDetailsViewControls; m_Controls->setupUi( parent ); m_Controls->m_OdfBox->setVisible(false); m_Controls->m_ODFRenderWidget->setVisible(false); m_SliceChangeListener.RenderWindowPartActivated(this->GetRenderWindowPart()); connect(&m_SliceChangeListener, SIGNAL(SliceChanged()), this, SLOT(OnSliceChanged())); } } void QmitkODFDetailsView::OnSelectionChanged(berry::IWorkbenchPart::Pointer /*part*/, const QList& nodes) { - if (m_ImageNode.IsNotNull()) - m_ImageNode->RemoveObserver( m_PropertyObserverTag ); - m_Controls->m_InputData->setTitle("Please Select Input Data"); m_Controls->m_InputImageLabel->setText("mandatory"); m_ImageNode = nullptr; // iterate selection for (mitk::DataNode::Pointer node: nodes) { if( node.IsNotNull() && (dynamic_cast(node->GetData()) || dynamic_cast(node->GetData())) ) { m_Controls->m_InputImageLabel->setText(node->GetName().c_str()); m_ImageNode = node; } } UpdateOdf(); if (m_ImageNode.IsNotNull()) { m_Controls->m_InputData->setTitle("Input Data"); } } void QmitkODFDetailsView::UpdateOdf() { try { m_Controls->m_OverviewBox->setVisible(true); if (m_ImageNode.IsNull() || !this->GetRenderWindowPart()) { m_Controls->m_ODFRenderWidget->setVisible(false); m_Controls->m_OdfBox->setVisible(false); m_Controls->m_OverviewBox->setVisible(false); return; } // restore the input image label ( needed in case the last run resulted into an exception ) m_Controls->m_InputImageLabel->setText(m_ImageNode->GetName().c_str()); // ODF Normalization Property mitk::OdfNormalizationMethodProperty* nmp = dynamic_cast(m_ImageNode->GetProperty( "Normalization" )); if(nmp) m_OdfNormalization = nmp->GetNormalization(); m_TemplateOdf = itk::OrientationDistributionFunction::GetBaseMesh(); m_OdfTransform = vtkSmartPointer::New(); m_OdfTransform->Identity(); m_OdfVals = vtkSmartPointer::New(); m_OdfSource = vtkSmartPointer::New(); itk::OrientationDistributionFunction odf; mitk::Point3D world = this->GetRenderWindowPart()->GetSelectedPosition(); mitk::Point3D index; mitk::Image::Pointer img = dynamic_cast(m_ImageNode->GetData()); unsigned int *img_dimension = img->GetDimensions(); img->GetGeometry()->WorldToIndex(world, index); float sum = 0; float max = itk::NumericTraits::NonpositiveMin(); float min = itk::NumericTraits::max(); QString values; QString overviewText; // check if dynamic_cast successfull and if the crosshair position is inside of the geometry of the ODF data // otherwise possible crash for a scenario with multiple nodes if (dynamic_cast(m_ImageNode->GetData()) && ( m_ImageNode->GetData()->GetGeometry()->IsInside(world) ) ) { m_Controls->m_ODFRenderWidget->setVisible(true); m_Controls->m_OdfBox->setVisible(true); try { const mitk::OdfImage* Odf_image = dynamic_cast< mitk::OdfImage* >( m_ImageNode->GetData() ); // get access to the Odf image data with explicitely allowing exceptions if memory locked mitk::ImageReadAccessor readAccess( Odf_image, Odf_image->GetVolumeData(0), mitk::ImageAccessorBase::ExceptionIfLocked ); const float* Odf_cPtr = static_cast< const float*>(readAccess.GetData()); OdfVectorImgType::IndexType ind; ind[0] = (int)(index[0]+0.5); ind[1] = (int)(index[1]+0.5); ind[2] = (int)(index[2]+0.5); // pixel size = ODF_SAMPLING_SIZE // position offset = standard offset unsigned int offset_to_data = ODF_SAMPLING_SIZE * (ind[2] * img_dimension[1] * img_dimension[0] + ind[1] * img_dimension[0] + ind[0]); const float *pixel_data = Odf_cPtr + offset_to_data; for (int i=0; imax) max = val; if (val pd = odf.GetDirection(odf.GetPrincipalDiffusionDirectionIndex()); overviewText += "Main Diffusion:\n "+QString::number(pd[0])+"\n "+QString::number(pd[1])+"\n "+QString::number(pd[2])+"\n"; m_Controls->m_OdfValuesTextEdit->setText(values); m_Controls->m_OverviewTextEdit->setVisible(true); } catch( mitk::Exception &e ) { MITK_WARN << "LOCKED : " << e.what(); m_Controls->m_ODFRenderWidget->setVisible(false); m_Controls->m_OdfBox->setVisible(false); m_Controls->m_OverviewTextEdit->setVisible(false); // reset the selection m_Controls->m_InputImageLabel->setText("Click image to restore rendering!"); } } else if (dynamic_cast(m_ImageNode->GetData()) && ( m_ImageNode->GetData()->GetGeometry()->IsInside(world) ) ) { m_Controls->m_ODFRenderWidget->setVisible(true); m_Controls->m_OdfBox->setVisible(false); const mitk::TensorImage* Odf_image = dynamic_cast< mitk::TensorImage*>(m_ImageNode->GetData()); // pixel access block try { // get access to the Odf image data with explicitely allowing exceptions if memory locked mitk::ImageReadAccessor readAccess( Odf_image, Odf_image->GetVolumeData(0), mitk::ImageAccessorBase::ExceptionIfLocked ); const float* Odf_cPtr = static_cast< const float*>(readAccess.GetData()); TensorImageType::IndexType ind; ind[0] = (int)(index[0]+0.5); ind[1] = (int)(index[1]+0.5); ind[2] = (int)(index[2]+0.5); // 6 - tensorsize // remaining computation - standard offset unsigned int offset_to_data = 6 * (ind[2] * img_dimension[1] * img_dimension[0] + ind[1] * img_dimension[0] + ind[0]); const float *pixel_data = Odf_cPtr + offset_to_data; float tensorelems[6] = { *(pixel_data ), *(pixel_data + 1), *(pixel_data + 2), *(pixel_data + 3), *(pixel_data + 4), *(pixel_data + 5), }; TensorPixelType tensor(tensorelems); odf.InitFromTensor(tensor); /** Array of eigen-values. */ typedef itk::FixedArray EigenValuesArrayType; /** Matrix of eigen-vectors. */ typedef itk::Matrix EigenVectorsMatrixType; EigenValuesArrayType eigenValues; EigenVectorsMatrixType eigenvectors; QString pos = QString::number(ind[0])+", "+QString::number(ind[1])+", "+QString::number(ind[2]); overviewText += "Coordinates: "+pos+"\n"; overviewText += "FA: "+QString::number(tensor.GetFractionalAnisotropy())+"\n"; overviewText += "RA: "+QString::number(tensor.GetRelativeAnisotropy())+"\n"; overviewText += "Trace: "+QString::number(tensor.GetTrace())+"\n"; tensor.ComputeEigenAnalysis(eigenValues,eigenvectors); overviewText += "Eigenvalues:\n "+QString::number(eigenValues[2])+"\n "+QString::number(eigenValues[1])+"\n "+QString::number(eigenValues[0])+"\n"; overviewText += "Main Diffusion:\n "+QString::number(eigenvectors(2, 0))+"\n "+QString::number(eigenvectors(2, 1))+"\n "+QString::number(eigenvectors(2, 2))+"\n"; overviewText += "Values:\n "+QString::number(tensorelems[0])+"\n "+QString::number(tensorelems[1])+"\n "+QString::number(tensorelems[2])+"\n "+QString::number(tensorelems[3])+"\n "+QString::number(tensorelems[4])+"\n "+QString::number(tensorelems[5])+"\n "+"\n"; m_Controls->m_OverviewTextEdit->setVisible(true); } // end pixel access block catch(mitk::Exception &e ) { MITK_WARN << "LOCKED : " << e.what(); m_Controls->m_ODFRenderWidget->setVisible(false); m_Controls->m_OdfBox->setVisible(false); m_Controls->m_OverviewTextEdit->setVisible(false); // reset the selection m_Controls->m_InputImageLabel->setText("Click image to restore rendering!"); } } else { m_Controls->m_ODFRenderWidget->setVisible(false); m_Controls->m_OdfBox->setVisible(false); overviewText += "Please reinit image geometry.\n"; } // proceed only if the render widget is visible which indicates that the // predecessing computations were successfull if( m_Controls->m_ODFRenderWidget->isVisible() ) { m_Controls->m_ODFDetailsWidget->SetParameters(odf); switch(m_OdfNormalization) { case 0: odf = odf.MinMaxNormalize(); break; case 1: odf = odf.MaxNormalize(); break; case 2: odf = odf.MaxNormalize(); break; default: odf = odf.MinMaxNormalize(); } m_Controls->m_ODFRenderWidget->GenerateODF(odf); m_Controls->m_OverviewTextEdit->setText(overviewText.toStdString().c_str()); } } catch(...) { QMessageBox::critical(0, "Error", "Data could not be analyzed. The image might be corrupted."); } } void QmitkODFDetailsView::OnSliceChanged() { UpdateOdf(); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.h b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.h index f4b5835190..26955931f2 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkODFDetailsView.h @@ -1,118 +1,112 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _QMITKQmitkODFDetailsView_H_INCLUDED #define _QMITKQmitkODFDetailsView_H_INCLUDED #include #include #include "mitkILifecycleAwarePart.h" #include "ui_QmitkODFDetailsViewControls.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*! \brief View displaying details of the orientation distribution function in the voxel at the current crosshair position. */ class QmitkODFDetailsView : public QmitkAbstractView, public mitk::ILifecycleAwarePart { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: static const std::string VIEW_ID; QmitkODFDetailsView(); virtual ~QmitkODFDetailsView(); typedef mitk::OdfImage::ScalarPixelType TOdfPixelType; typedef mitk::OdfImage::PixelType OdfVectorType; typedef mitk::OdfImage::ItkOdfImageType OdfVectorImgType; typedef mitk::TensorImage::PixelType TensorPixelType; typedef mitk::TensorImage::ItkTensorImageType TensorImageType; virtual void CreateQtPartControl(QWidget *parent) override; protected slots: void OnSliceChanged(); protected: /// \brief called by QmitkAbstractView when DataManager's selection has changed virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer part, const QList& nodes) override; virtual void SetFocus() override; virtual void Activated() override; virtual void Deactivated() override; virtual void Visible() override; virtual void Hidden() override; void UpdateOdf(); ///< called if slice position or datamanager selection has changed Ui::QmitkODFDetailsViewControls* m_Controls; - /** observer flags */ - int m_SliceObserverTag1; - int m_SliceObserverTag2; - int m_SliceObserverTag3; - int m_PropertyObserverTag; - /** ODF related variables like mesh structure, values etc. */ vtkPolyData* m_TemplateOdf; ///< spherical base mesh vtkSmartPointer m_OdfTransform; vtkSmartPointer m_OdfVals; vtkSmartPointer m_OdfSource; int m_OdfNormalization; ///< normalization method defined in the visualization view /** rendering of the ODF */ vtkActor* m_VtkActor; vtkPolyDataMapper* m_VtkMapper; vtkRenderer* m_Renderer; vtkRenderWindow* m_VtkRenderWindow; vtkRenderWindowInteractor* m_RenderWindowInteractor; vtkCamera* m_Camera; mitk::DataNode::Pointer m_ImageNode; QmitkSliceNavigationListener m_SliceChangeListener; }; #endif // _QmitkODFDetailsView_H_INCLUDED diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkQBallReconstructionViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkQBallReconstructionViewControls.ui index 22f3bc7697..e3356b76b2 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkQBallReconstructionViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkQBallReconstructionViewControls.ui @@ -1,343 +1,346 @@ QmitkQBallReconstructionViewControls 0 0 372 844 0 0 true QmitkQBallReconstructionViewControls - - + + + 25 + + Please Select Input Data 0 0 0 0 Input for Q-Ball reconstruction. Raw DWI: Input for Q-Ball reconstruction. <font color='red'>mandatory</font> true - + Parameters - + 0 0 0 0 - + 2 Numerical Standard Solid Angle Constraint Solid Angle ADC-Profile only Raw Signal only Multi-Shell - + TextLabel - + QFrame::NoFrame QFrame::Raised 0 0 0 0 QFrame::NoFrame QFrame::Raised 0 0 0 0 true Regularization Parameter Lambda: false Regularization factor 3 1.000000000000000 0.001000000000000 0.006000000000000 true SH-Order: false true -1 true B0 Threshold false 10000 Output SH-Coefficient Image false - + false Start Reconstruction - + true Qt::LeftToRight false Multi-Shell Reconstruction 0 0 0 0 - + Qt::Vertical 20 0 diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkTensorReconstructionViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkTensorReconstructionViewControls.ui index 784ebe5fd8..910a5e2d03 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkTensorReconstructionViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/QmitkTensorReconstructionViewControls.ui @@ -1,644 +1,641 @@ QmitkTensorReconstructionViewControls 0 0 381 1019 0 0 true QmitkTensorReconstructionViewControls - - + + + 25 + + Please Select Input Data: 0 0 0 0 <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> true Raw DWI/DTI: - + Tensor Reconstruction - + 0 0 0 0 - + Advanced Settings false - + QFrame::StyledPanel QFrame::Raised 9 9 9 9 QFrame::NoFrame QFrame::Raised 0 0 0 0 B0 Threshold false 10000 Only influences WLS reconstruction Ignore voxels with negative eigenvalues 0 ITK Linear Least Squares With correction for negative eigenvalues - + false Select raw DWI! Start Reconstruction - + Diffusion-weighted Image from Tensors - - - 0 - + 0 0 0 0 - + QFrame::NoFrame QFrame::Raised QFormLayout::AllNonFixedFieldsGrow 6 6 0 0 0 0 how fuzzy the confidence boundary should be. By default, confidence boundary is perfectly sharp (float); default: "0" how fuzzy the confidence boundary should be. By default, confidence boundary is perfectly sharp (float); default: "0" how fuzzy the confidence boundary should be. By default, confidence boundary is perfectly sharp (float); default: "0" B-Value false #Gradient Directions 3 12 42 92 162 252 362 492 642 812 1002 10000 100 1000 - + false Estimates the original diffusion weighted image based on a reconstructed tensor image. Estimate DWI based on Tensor Image - + ODF Image from Tensors - - - 0 - + 0 0 0 0 - + false Calculate ODF value as tensor value in the according direction Start - + Calculate Residuals false false 0 0 0 0 - 0 + 6 false percentages of error 0 Per volume 200 300 Per slice outliers per slice QFrame::NoFrame QFrame::Raised 0 0 0 0 300 400 QFrame::NoFrame QFrame::Raised 0 0 0 0 20 255 Volume: .., Slice:.. false Calculate the residual from a dti and a dwi image Start - + Qt::Vertical 20 40 QmitkResidualAnalysisWidget QWidget
QmitkResidualAnalysisWidget.h
1
QmitkResidualViewWidget QGraphicsView
QmitkResidualViewWidget.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/mitkPluginActivator.cpp index ceb16b327a..8f1c0a3c84 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.reconstruction/src/internal/mitkPluginActivator.cpp @@ -1,47 +1,49 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPluginActivator.h" #include "src/internal/QmitkQBallReconstructionView.h" #include "src/internal/QmitkTensorReconstructionView.h" #include "src/internal/QmitkDiffusionQuantificationView.h" #include "src/internal/QmitkODFDetailsView.h" #include "src/internal/Perspectives/QmitkReconstructionPerspective.h" +#include "src/internal/Perspectives/QmitkQuantificationPerspective.h" ctkPluginContext* mitk::PluginActivator::m_Context = nullptr; ctkPluginContext* mitk::PluginActivator::GetContext() { return m_Context; } void mitk::PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkReconstructionPerspective, context) + BERRY_REGISTER_EXTENSION_CLASS(QmitkQuantificationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkQBallReconstructionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionQuantificationView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTensorReconstructionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkODFDetailsView, context) m_Context = context; } void mitk::PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) m_Context = nullptr; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/files.cmake index 88ebeda4b0..0c53c6ac2e 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/files.cmake @@ -1,46 +1,44 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp QmitkHeadMotionCorrectionView.cpp QmitkSimpleRegistrationView.cpp - QmitkDwiRegistrationPerspective.cpp ) set(UI_FILES src/internal/QmitkHeadMotionCorrectionViewControls.ui src/internal/QmitkSimpleRegistrationViewControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/QmitkHeadMotionCorrectionView.h src/internal/QmitkSimpleRegistrationView.h - src/internal/QmitkDwiRegistrationPerspective.h ) set(CACHED_RESOURCE_FILES plugin.xml resources/diffusionregistration.png ) set(QRC_FILES ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/plugin.xml index c66c507de8..91e656626c 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/plugin.xml @@ -1,52 +1,40 @@ - - - - This perspective contains views for rigid image registration and head motion correction. - - - - - diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkSimpleRegistrationViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkSimpleRegistrationViewControls.ui index 67cb63db27..d0fad49d5b 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkSimpleRegistrationViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkSimpleRegistrationViewControls.ui @@ -1,231 +1,279 @@ QmitkSimpleRegistrationViewControls 0 0 435 744 Form - - - - QFrame::NoFrame + + 25 + + + + + Qt::Vertical - - QFrame::Raised + + + 20 + 40 + - + + + + + + Image Registration + + 0 0 0 0 - - - - - - - Moving Image: - - - - - - - - + + false - Select dMRI volume used to calculate transformation. + + + + Start Registration - - - - false + + + + QFrame::NoFrame - - Select dMRI volume used to calculate transformation. + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + Rigid + + + + + Affine + + + + + + + + Registration Type: + + + + + + + + + + + + + + Output Registration Object: + + + + - - - Fixed Image: + + + QFrame::NoFrame + + + QFrame::Raised + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + Moving Image: + + + + + + + + + + false + + + Select dMRI volume used to calculate transformation. + + + + + + + false + + + Select dMRI volume used to calculate transformation. + + + + + + + Fixed Image: + + + + - - - - Qt::Vertical - - - - 20 - 40 - - - - - - + + QFrame::NoFrame QFrame::Raised - + 0 0 0 0 - - - - - Rigid - - - - - Affine - - - - - - - - Registration Type: + + + + false - - - - - + - - - - - Output Registration Object: + Start Tractography Registration - - - - - - - false - - - - - - Start Registration - - - - - - - Tractography Registration - - - - 0 - - - 0 - - - 0 - - - 0 - - - - Registration Object: - - - - - - - - - - Tractogram: + + + Tractography Registration + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Registration Object: + + + + + + + + + + Tractogram: + + + + + + + - - - - - - - false - - - - - - Start Tractography Registration - - - QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/mitkPluginActivator.cpp index ee12c7bdca..7432af3c10 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/mitkPluginActivator.cpp @@ -1,43 +1,41 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPluginActivator.h" #include "src/internal/QmitkHeadMotionCorrectionView.h" #include "src/internal/QmitkSimpleRegistrationView.h" -#include "src/internal/QmitkDwiRegistrationPerspective.h" ctkPluginContext* mitk::PluginActivator::m_Context = nullptr; ctkPluginContext* mitk::PluginActivator::GetContext() { return m_Context; } void mitk::PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkHeadMotionCorrectionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkSimpleRegistrationView, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkDwiRegistrationPerspective, context) m_Context = context; } void mitk::PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) m_Context = nullptr; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/documentation/UserManual/QmitkStreamlineTrackingViewUserManual.dox b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/documentation/UserManual/QmitkStreamlineTrackingViewUserManual.dox index b0c3201ed9..7e619f3e6f 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/documentation/UserManual/QmitkStreamlineTrackingViewUserManual.dox +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/documentation/UserManual/QmitkStreamlineTrackingViewUserManual.dox @@ -1,84 +1,95 @@ /** \page org_mitk_views_streamlinetracking Streamline Tractography This view enables streamline tractography on various input data. The corresponding command line application is named "MitkStreamlineTractography". Available sections: - - \ref StrTrackUserManualInputData - - \ref StrTrackUserManualInteractive - - \ref StrTrackUserManualParameters - - \ref StrTrackUserManualAdvancedParameters - - \ref StrTrackUserManualReferences +- \ref StrTrackUserManualInputData +- \ref StrTrackUserManualSeeding +- \ref StrTrackUserManualConstraints +- \ref StrTrackUserManualParameters +- \ref StrTrackUserManualNeighbourhoodSampling +- \ref StrTrackUserManualDataHandling +- \ref StrTrackUserManualPostprocessing +- \ref StrTrackUserManualReferences \section StrTrackUserManualInputData Input Data -Input: - Select the data you want to track on in the datamanager. Supported file types are: -\li One or multiple DTI images selected in the datamanager. -\li One ODF image, e.g. obtained using MITK Q-ball reconstruction or MRtrix CSD (tractography similar to [6]). -\li One peak image (4D float image). -\li One raw diffusion-weighted image for machine learning based tractography [1]. +- One or multiple DTI images selected in the datamanager. +- One ODF image, e.g. obtained using MITK Q-ball reconstruction or MRtrix CSD (tractography similar to [6]). +- One peak image (4D float image). +- One raw diffusion-weighted image for machine learning based tractography [1]. +-- Tractography Forest: Needed for machine learning based tractography [1]. + +\section StrTrackUserManualSeeding Seeding + +Specify how, where and how many tractography seed points are placed. This can be either done statically using a seed image or in an interactive fashion. Interactive tractography enables the dynamic placement of spherical seed regions simply by clicking into the image (similar to [5]). + +Image based seeding: +- Seed Image: ROI image used to define the seed voxels. If no seed mask is specified, the whole image volume is seeded. +- Seeds per voxel: If set to 1, the seed is defined as the voxel center. If > 1 the seeds are distributet randomly inside the voxel. + +Interactive seeding: +- Update on Parameter Change: When "Update on Parameter Change" is checked, each parameter change causes an instant retracking with the new parameters. This enables an intuitive exploration of the effects that the other tractography parameters have on the resulting tractogram. +- Radius: Radius of the manually placed spherical seed region. +- Num.Seeds: Number of seeds placed randomly inside the spherical seed region. + +Parameters for both seeding modes: +- Trials Per Seed: Try each seed N times until a valid streamline is obtained (only for probabilistic tractography). +- Max. Num. Fibers: Tractography is stopped after the desired number of fibers is reached, even before all seed points are processed. -Optional Input: +\section StrTrackUserManualConstraints ROI Constraints -- Mask used to define the seed voxels. If no seed mask is specified, the whole image volume is seeded. -- Mask used to constrain the generated streamlines. Streamlines can not leave the mask area. -- Binary mask used to define stopping regions. Streamlines that enter the mask area are stopped immediately. -- Endpoint Constraints: Determines what fibers are accepted based on their endpoint location. Options are: +Specify various ROI and mask images to constrain the tractography process. + +- Mask Image: ROI image used to constrain the generated streamlines, typically a brain mask. Streamlines that leave the regions defined in this image will stop immediately. +- Stop Image: ROI image used to define stopping regions. Streamlines that enter the regions defined in this image will stop immediately. +- Endpoint Constraints: Determines which fibers are accepted based on their endpoint location. Options are: - No constraints on endpoint locations (command line option NONE) - Both EPs are required to be located in the target image (command line option EPS_IN_TARGET) - Both EPs are required to be located in the target image and the image values at the respective position needs to be distinct (command line option EPS_IN_TARGET_LABELDIFF) - One EP is required to be located in the seed image and one in the target image (command line option EPS_IN_SEED_AND_TARGET) - At least one EP is required to be located in the target image (command line option MIN_ONE_EP_IN_TARGET) - Exactly one EP is required to be located in the target image (command line option ONE_EP_IN_TARGET) - No EP is allowed to be located in the target image (command line option NO_EP_IN_TARGET) -- Mask to define the target region needed for endpoint constraints. -- FA/GFA image used to determine streamline termination. If no image is specified, the FA/GFA image is automatically calculated from the input image. If multiple tensor images are used as input, it is recommended to provide such an image since the FA maps calculated from the individual input tensor images can not provide a suitable termination criterion. -- Tractography Forest: Needed for machine learning based tractography [1]. - -\section StrTrackUserManualInteractive Interactive Tractography +- Target Image: ROI image needed for endpoint constraints. -Interactive tractography enables the dynamic placement of spherical seed regions simply by clicking into the image (similar to [5]). Parameters are the number of seed points and the radius of the spherical seed region. The seed points are randomly distributed inside the sphere around the selected position. By clicking and holding the left mouse button while moving the mouse around the image, the fiber connections originating from the selected region can be explored dynamically. -When "Update on Parameter Change" is checked, each parameter change causes an instant retracking with the new parameters. This enables an intuitive exploration of the effcts that the individual parameters have on the resulting tractogram. +\section StrTrackUserManualParameters Tractography Parameters -\section StrTrackUserManualParameters Parameters - -\li Mode: Toggle between deterministic and probabilistic tractography. Peak tracking only supports deterministic mode. The probabilistic method simply samples the output direction from the discrete probability ditribution provided by the discretized ODF. -\li Seeds per voxel: If set to 1, the seed is defined as the voxel center. If > 1 the seeds are distributet randomly inside the voxel. -\li Max. num. fibers: Tractography is stopped after the desired number of fibers is reached, even before all seed points are processed. -\li Cutoff: If the streamline reaches a position with an FA value or peak magnitude lower than the speciefied threshold, tracking is terminated. Typical values are 0.2 for FA/GFA and 0.1 for CSD peaks. -\li ODF Cutoff: Additional threshold on the ODF magnitude. This is useful in case of CSD fODF tractography. For MRtrix CSD fODF images, a typical value is 0.1. -\li Sharpen ODFs: If you are using dODF images as input, it is advisable to sharpen the ODFs (min-max normalize and raise to the power of 4). This is not necessary (and not recommended) for CSD fODFs, since they are naturally much sharper. - -\section StrTrackUserManualAdvancedParameters Advanced Parameters -\li Step Size: The algorithm proceeds along the streamline with a fixed stepsize. Default is 0.5*minSpacing. -\li Angular threshold: Maximum angle between two successive steps (in degree). Default is 90° * step_size. For probabilistic tractography, candidate directions exceeding this threshold have probability 0, i.e. the respective ODF value is set to zero. The probabilities of the valid directions are normalized to sum to 1. -\li Min. Tract Length: Shorter fibers are discarded. -\li Loop Check: Stop streamline if the threshold on the angular stdev over the last 4 voxel lengths is exceeded. -1 = no loop check. -\li Trials Per Seed: Try each seed N times until a valid streamline is obtained (only for probabilistic tractography). -\li f and g values to balance between FACT [2] and TEND [3,4] tracking (only for tensor based tractography). For further information please refer to [2,3] -\li Flip directions: Internally flips progression directions. This might be necessary depending on the input data. -\li Enable Trilinear Interpolation: By default the image values are interpolated. Keep in mind that in the noninterpolated case, the TEND term is only applied once per voxel. In the interpolated case the TEND term is applied at each integration step which results in much higher curvatures and has to be compensated by an according choice of f and g. -\li Enable Gray Matter Seeding: Seeds are onyl placed inside of the gray matter. Needs tissue label image. +- Mode: Toggle between deterministic and probabilistic tractography. Peak tracking only supports deterministic mode. The probabilistic method simply samples the output direction from the discrete probability ditribution provided by the discretized ODF. +- Sharpen ODFs: If you are using dODF images as input, it is advisable to sharpen the ODFs (min-max normalize and raise to the power of 4). This is not necessary (and not recommended) for CSD fODFs, since they are naturally much sharper. +- Cutoff: If the streamline reaches a position with an FA value or peak magnitude lower than the speciefied threshold, tracking is terminated. Typical values are 0.2 for FA/GFA and 0.1 for CSD peaks. +- FA/GFA image used to determine streamline termination. If no image is specified, the FA/GFA image is automatically calculated from the input image. If multiple tensor images are used as input, it is recommended to provide such an image since the FA maps calculated from the individual input tensor images can not provide a suitable termination criterion. +- ODF Cutoff: Additional threshold on the ODF magnitude. This is useful in case of CSD fODF tractography. For fODFs a good default value is 0.1, for normalized dODFs, e.g. Q-ball ODFs, this threshold should be very low (0.00025) or 0. +- Step Size: The algorithm proceeds along the streamline with a fixed stepsize. Default is 0.5*minSpacing. +- Min. Tract Length: Shorter fibers are discarded. +- Angular threshold: Maximum angle between two successive steps (in degree). Default is 90° * step_size. For probabilistic tractography, candidate directions exceeding this threshold have probability 0, i.e. the respective ODF value is set to zero. The probabilities of the valid directions are normalized to sum to 1. +- Loop Check: Stop streamline if the threshold on the angular stdev over the last 4 voxel lengths is exceeded. -1 = no loop check. +- f and g values to balance between FACT [2] and TEND [3,4] tracking (only for tensor based tractography). For further information please refer to [2,3] + +\section StrTrackUserManualDataHandling Data Handling +- Flip directions: Internally flips progression directions. This might be necessary depending on the input data. +- Interpolate Tractography Data: Trilinearly interpolate the input image used for tractography. +- Interpolate ROI Images: Trilinearly interpolate the ROI images used to constrain the tractography. \section StrTrackUserManualNeighbourhoodSampling Neighbourhood Sampling (for details see [1]) -\li Neighborhood Samples: Number of neighborhood samples that are used to determine the next fiber progression direction. -\li Sampling Distance: Distance of the sampling positions from the current streamline position (in voxels). -\li Use Only Frontal Samples: Only neighborhood samples in front of the current streamline position are considered. -\li Use Stop-Votes: If checked, the majority of sampling points has to place a stop-vote for the streamline to terminate. If not checked, all sampling positions have to vote for a streamline termination. +- Neighborhood Samples: Number of neighborhood samples that are used to determine the next fiber progression direction. +- Sampling Distance: Distance of the sampling positions from the current streamline position (in voxels). +- Use Only Frontal Samples: Only neighborhood samples in front of the current streamline position are considered. +- Use Stop-Votes: If checked, the majority of sampling points has to place a stop-vote for the streamline to terminate. If not checked, all sampling positions have to vote for a streamline termination. \section StrTrackUserManualPostprocessing Output and Postprocessing -\li Compress Fibers: Whole brain tractograms obtained with a small step size can contain billions of points. The tractograms can be compressed by removing points that do not really contribute to the fiber shape, such as many points on a straight line. An error threshold (in mm) can be defined to specify which points should be removed and which not. -\li Output Probability Map: No streamline are generated. Instead, the tractography outputs a probability map that indicates the probability of a fiber to reach a voxel from the selected seed region. For this measure to be sensible, the number of seeds per voxel needs to be rather large. +- Compress Fibers: Whole brain tractograms obtained with a small step size can contain billions of points. The tractograms can be compressed by removing points that do not really contribute to the fiber shape, such as many points on a straight line. An error threshold (in mm) can be defined to specify which points should be removed and which not. +- Output Probability Map: No streamline are generated. Instead, the tractography outputs a visitation-count map that indicates the probability of a fiber to reach a voxel from the selected seed region. For this measure to be sensible, the number of seeds per voxel needs to be rather large. \section StrTrackUserManualReferences References [1] Neher, Peter F., Marc-Alexandre Côté, Jean-Christophe Houde, Maxime Descoteaux, and Klaus H. Maier-Hein. “Fiber Tractography Using Machine Learning.” NeuroImage. Accessed July 19, 2017. doi:10.1016/j.neuroimage.2017.07.028.\n [2] Mori, Susumu, Walter E. Kaufmann, Godfrey D. Pearlson, Barbara J. Crain, Bram Stieltjes, Meiyappan Solaiyappan, and Peter C. M. Van Zijl. “In Vivo Visualization of Human Neural Pathways by Magnetic Resonance Imaging.” Annals of Neurology 47 (2000): 412–414.\n [3] Weinstein, David, Gordon Kindlmann, and Eric Lundberg. “Tensorlines: Advection-Diffusion Based Propagation through Diffusion Tensor Fields.” In Proceedings of the Conference on Visualization’99: Celebrating Ten Years, 249–253, n.d.\n [4] Lazar, Mariana, David M. Weinstein, Jay S. Tsuruda, Khader M. Hasan, Konstantinos Arfanakis, M. Elizabeth Meyerand, Benham Badie, et al. “White Matter Tractography Using Diffusion Tensor Deflection.” Human Brain Mapping 18, no. 4 (2003): 306–321.\n [5] Chamberland, M., K. Whittingstall, D. Fortin, D. Mathieu, and M. Descoteaux. “Real-Time Multi-Peak Tractography for Instantaneous Connectivity Display.” Front Neuroinform 8 (2014): 59. doi:10.3389/fninf.2014.00059.\n [6] Tournier, J-Donald, Fernando Calamante, and Alan Connelly. “MRtrix: Diffusion Tractography in Crossing Fiber Regions.” International Journal of Imaging Systems and Technology 22, no. 1 (March 2012): 53–66. doi:10.1002/ima.22005. */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/files.cmake index dc3967cfd7..42137f0e9c 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/files.cmake @@ -1,62 +1,58 @@ set(SRC_CPP_FILES QmitkMlbstTrainingDataWidget.cpp ) set(INTERNAL_CPP_FILES QmitkGibbsTrackingView.cpp QmitkStreamlineTrackingView.cpp QmitkMLBTView.cpp - Perspectives/QmitkMachineLearningTractographyPerspective.cpp Perspectives/QmitkGibbsTractographyPerspective.cpp Perspectives/QmitkStreamlineTractographyPerspective.cpp mitkPluginActivator.cpp ) set(UI_FILES src/internal/QmitkGibbsTrackingViewControls.ui src/internal/QmitkStreamlineTrackingViewControls.ui src/internal/QmitkMLBTViewControls.ui src/QmitkMlbstTrainingDataWidgetControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/QmitkGibbsTrackingView.h src/internal/QmitkStreamlineTrackingView.h src/internal/QmitkMLBTView.h src/QmitkMlbstTrainingDataWidget.h - src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.h src/internal/Perspectives/QmitkGibbsTractographyPerspective.h src/internal/Perspectives/QmitkStreamlineTractographyPerspective.h ) set(CACHED_RESOURCE_FILES plugin.xml - resources/tractography.png - resources/fiberTracking1.png - resources/StreamlineTracking.png - resources/GibbsTracking.png + resources/tract.png + resources/tractogram.png resources/ml_tractography.png ) set(QRC_FILES ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/plugin.xml index d17b5a81e4..cff08b366e 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/plugin.xml @@ -1,99 +1,91 @@ + icon="resources/tractogram.png"> + icon="resources/tract.png"> - + icon="resources/tractogram.png"> + - - - - - + icon="resources/tract.png"> + diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/GibbsTracking.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/GibbsTracking.png index 9582dd772d..993ad933b8 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/GibbsTracking.png and b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/GibbsTracking.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/StreamlineTracking.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/StreamlineTracking.png deleted file mode 100644 index 5d8d143597..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/StreamlineTracking.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/fiberTracking1.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/fiberTracking1.png deleted file mode 100644 index e70c3c154c..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/fiberTracking1.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/ml_tractography.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/ml_tractography.png index 7c1d7af374..cceac802c9 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/ml_tractography.png and b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/ml_tractography.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tract.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tract.png new file mode 100644 index 0000000000..a98bb20f61 Binary files /dev/null and b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tract.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractogram.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractogram.png new file mode 100644 index 0000000000..98df10cf69 Binary files /dev/null and b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractogram.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractography.png b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractography.png deleted file mode 100644 index 9582dd772d..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/resources/tractography.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkGibbsTractographyPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkGibbsTractographyPerspective.cpp index fc805e1180..d3d530a1cc 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkGibbsTractographyPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkGibbsTractographyPerspective.cpp @@ -1,50 +1,48 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkGibbsTractographyPerspective.h" #include "berryIViewLayout.h" void QmitkGibbsTractographyPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", - false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", - false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", - berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", - berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// - left->AddView("org.mitk.views.gibbstracking"); - left->AddView("org.mitk.views.qballreconstruction"); - left->AddView("org.mitk.views.tensorreconstruction"); + left->AddView("org.mitk.views.gibbstracking"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkStreamlineTractographyPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkStreamlineTractographyPerspective.cpp index 896f44a280..e14766ec2a 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkStreamlineTractographyPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkStreamlineTractographyPerspective.cpp @@ -1,50 +1,49 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkStreamlineTractographyPerspective.h" #include "berryIViewLayout.h" void QmitkStreamlineTractographyPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { - ///////////////////////////////////////////////////// - // all di-app perspectives should have the following: - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// + // all di-app perspectives should have the following: + ///////////////////////////////////////////////////// - QString editorArea = layout->GetEditorArea(); + QString editorArea = layout->GetEditorArea(); - layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); - layout->AddStandaloneView("org.mitk.views.datamanager", - false, berry::IPageLayout::LEFT, 0.3f, editorArea); + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", - false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); - berry::IFolderLayout::Pointer left = - layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", - berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); + berry::IFolderLayout::Pointer left = + layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", + berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); - layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", - berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); + layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", + berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); - ///////////////////////////////////////////// - // here goes the perspective specific stuff - ///////////////////////////////////////////// + ///////////////////////////////////////////// + // here goes the perspective specific stuff + ///////////////////////////////////////////// - left->AddView("org.mitk.views.streamlinetracking"); - left->AddView("org.mitk.views.segmentation"); - left->AddView("org.mitk.views.odfmaximaextraction"); + left->AddView("org.mitk.views.streamlinetracking"); + left->AddView("org.mitk.views.segmentation"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkGibbsTrackingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkGibbsTrackingViewControls.ui index fff3691d3f..5df82d4acc 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkGibbsTrackingViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkGibbsTrackingViewControls.ui @@ -1,1121 +1,1157 @@ QmitkGibbsTrackingViewControls 0 0 463 1011 0 0 0 0 QmitkTemplate QFormLayout::AllNonFixedFieldsGrow QFrame::NoFrame QFrame::Plain 0 0 0 0 0 - 0 + 6 false No ODF/tensor image selected. Qt::LeftToRight Start Tractography :/QtWidgetsExt/play.xpm:/QtWidgetsExt/play.xpm false Qt::LeftToRight Stop Tractography :/QtWidgetsExt/stop.xpm:/QtWidgetsExt/stop.xpm Parameters + + 0 + + + 0 + + + 0 + 0 Output File: Advanced Settings true Activate continuous visualization of intermediate results. Visualize Tractography true QFrame::NoFrame QFrame::Plain 0 0 0 0 0 0 Select output file name and folder. ... N/A true Visualize intermediate result. :/QmitkDiffusionImaging/Refresh_48.png:/QmitkDiffusionImaging/Refresh_48.png true Iterations: 1e9 true QFrame::StyledPanel QFrame::Raised - 9 + 0 0 - 9 + 0 0 - 4 + 6 Particle Width: 0 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 0.1 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Particle Weight: 1 99 1 10 Qt::Horizontal QSlider::NoTicks Start Temperature: automatic estimation from gfa map and ODF data. 0 1000 1 0 Qt::Horizontal true QSlider::NoTicks IE Bias < 0 < EE Bias -50 50 1 Qt::Horizontal QSlider::NoTicks 0.001 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Curvature Threshold: Balance In/Ex Energy: 45° Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter auto = 0.5 * min. spacing; sigma 100 1 Qt::Horizontal QSlider::NoTicks Particle Length: auto Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter Min. Fiber Length: Only fibers longer than specified are accepted. 500 1 20 Qt::Horizontal QSlider::NoTicks Allow only fiber curvature values smaller than the selected threshold. 180 1 45 Qt::Horizontal QSlider::NoTicks End Temperature: 20mm Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter auto Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 1 100 1 10 Qt::Horizontal false false QSlider::NoTicks auto Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter auto = 1.5 * min. spacing; l 100 1 Qt::Horizontal QSlider::NoTicks Random Seed auto Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter auto = 1.5 * min. spacing; l -1 100 1 -1 Qt::Horizontal QSlider::NoTicks QFrame::NoFrame QFrame::Plain 0 - + 0 0 0 0 - 0 + 6 true Save current parameters as xml (.gtp) Qt::LeftToRight Save Parameters :/QtWidgetsExt/btnMoveDown.png:/QtWidgetsExt/btnMoveDown.png true Load parameters from xml file (.gtp) Qt::LeftToRight Load Parameters :/QtWidgetsExt/btnMoveUp.png:/QtWidgetsExt/btnMoveUp.png Qt::Vertical QSizePolicy::Expanding 0 0 0 0 Please Select Input Data + + 0 + + + 0 + + + 0 + + + 0 + 0 0 ODF/Tensor Image: Mandatory input <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> true Mask Image: <html><head/><body><p>White matter probability mask image.</p></body></html> <html><head/><body><p><span style=" color:#969696;">optional</span></p></body></html> true 0 0 Monitor + + 0 + + + 0 + + + 0 + + + 0 + + + 6 + Progress: - Will only be updated if tracking is visualized Will only be updated if tracking is visualized Accepted Fibers: Connections: Particles: Proposal Acceptance Rate: Tracking Time: Will only be updated if tracking is visualized - - - - - diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkMLBTViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkMLBTViewControls.ui index f83ff99b89..3ac10492fe 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkMLBTViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkMLBTViewControls.ui @@ -1,421 +1,433 @@ QmitkMLBTViewControls 0 0 - 446 + 476 548 Form - QFrame::StyledPanel + QFrame::NoFrame QFrame::Raised + + 0 + + + 0 + + + 0 + + + 0 + QFrame::NoFrame QFrame::Raised 0 0 0 0 Remove training data pair ... :/org_mitk_icons/icons/tango/scalable/actions/list-remove.svg:/org_mitk_icons/icons/tango/scalable/actions/list-remove.svg Add additional training data pair ... :/org_mitk_icons/icons/tango/scalable/actions/list-add.svg:/org_mitk_icons/icons/tango/scalable/actions/list-add.svg <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">It is recommended to use the command line application 'RfTraining' instead of this graphical user interface for the training process. Additional feature images are not supported here.</span></p><p><span style=" font-weight:600; color:#ff0000;">The GUI is intended for testing using small examples.</span></p></body></html> Qt::RichText Qt::AlignCenter true 5 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 6 QFrame::NoFrame QFrame::Raised 0 0 0 0 0 Input DWI: Qt::AlignCenter Reference Tractogram: Qt::AlignCenter Mask: Qt::AlignCenter WM: Qt::AlignCenter QFrame::NoFrame QFrame::Raised 0 0 0 0 Fraction of samples used to train each tree. 3 1.000000000000000 0.100000000000000 0.700000000000000 Num. Trees: Sample Fraction: Max. Depth: Fiber sampling in mm. Determines the number of white-matter samples (-1 = auto). 3 -1.000000000000000 999.000000000000000 0.100000000000000 -1.000000000000000 Number of tress in the final random forest. 1 999999999 30 Non-WM Sampling Points: Fiber Sampling: Maximum tree depth. 1 999999999 25 Number of sampling points outside of the white-matter (-1 = automatic estimation). -1 999999999 -1 Num. previous directions: Number of previous fiber directions used as features. 0 50 1 dMRI Features: Spherical Harmonics Coefficients Raw Data Start Training. This can take up to a couple of hours. Start Training Qt::Vertical 20 40 diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingView.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingView.cpp index 4c7742eddc..77dddc91a1 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingView.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingView.cpp @@ -1,904 +1,910 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ // Blueberry #include #include #include // Qmitk #include "QmitkStreamlineTrackingView.h" #include "QmitkStdMultiWidget.h" // Qt #include // MITK #include #include #include #include #include #include #include #include #include #include #include #include // VTK #include #include #include #include #include #include #include #include #include const std::string QmitkStreamlineTrackingView::VIEW_ID = "org.mitk.views.streamlinetracking"; const std::string id_DataManager = "org.mitk.views.datamanager"; using namespace berry; QmitkStreamlineTrackingWorker::QmitkStreamlineTrackingWorker(QmitkStreamlineTrackingView* view) : m_View(view) { } void QmitkStreamlineTrackingWorker::run() { m_View->m_Tracker->Update(); m_View->m_TrackingThread.quit(); } QmitkStreamlineTrackingView::QmitkStreamlineTrackingView() : m_TrackingWorker(this) , m_Controls(nullptr) , m_FirstTensorProbRun(true) , m_FirstInteractiveRun(true) , m_TrackingHandler(nullptr) , m_ThreadIsRunning(false) , m_DeleteTrackingHandler(false) { m_TrackingWorker.moveToThread(&m_TrackingThread); connect(&m_TrackingThread, SIGNAL(started()), this, SLOT(BeforeThread())); connect(&m_TrackingThread, SIGNAL(started()), &m_TrackingWorker, SLOT(run())); connect(&m_TrackingThread, SIGNAL(finished()), this, SLOT(AfterThread())); m_TrackingTimer = new QTimer(this); } // Destructor QmitkStreamlineTrackingView::~QmitkStreamlineTrackingView() { if (m_Tracker.IsNull()) return; m_Tracker->SetStopTracking(true); m_TrackingThread.wait(); } void QmitkStreamlineTrackingView::CreateQtPartControl( QWidget *parent ) { if ( !m_Controls ) { // create GUI widgets from the Qt Designer's .ui file m_Controls = new Ui::QmitkStreamlineTrackingViewControls; m_Controls->setupUi( parent ); m_Controls->m_FaImageBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_SeedImageBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_MaskImageBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_TargetImageBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_StopImageBox->SetDataStorage(this->GetDataStorage()); m_Controls->m_ForestBox->SetDataStorage(this->GetDataStorage()); mitk::TNodePredicateDataType::Pointer isImagePredicate = mitk::TNodePredicateDataType::New(); mitk::TNodePredicateDataType::Pointer isTractographyForest = mitk::TNodePredicateDataType::New(); mitk::NodePredicateProperty::Pointer isBinaryPredicate = mitk::NodePredicateProperty::New("binary", mitk::BoolProperty::New(true)); mitk::NodePredicateNot::Pointer isNotBinaryPredicate = mitk::NodePredicateNot::New( isBinaryPredicate ); mitk::NodePredicateAnd::Pointer isNotABinaryImagePredicate = mitk::NodePredicateAnd::New( isImagePredicate, isNotBinaryPredicate ); mitk::NodePredicateDimension::Pointer dimensionPredicate = mitk::NodePredicateDimension::New(3); m_Controls->m_ForestBox->SetPredicate(isTractographyForest); m_Controls->m_FaImageBox->SetPredicate( mitk::NodePredicateAnd::New(isNotABinaryImagePredicate, dimensionPredicate) ); m_Controls->m_FaImageBox->SetZeroEntryText("--"); m_Controls->m_SeedImageBox->SetPredicate( mitk::NodePredicateAnd::New(isImagePredicate, dimensionPredicate) ); m_Controls->m_SeedImageBox->SetZeroEntryText("--"); m_Controls->m_MaskImageBox->SetPredicate( mitk::NodePredicateAnd::New(isImagePredicate, dimensionPredicate) ); m_Controls->m_MaskImageBox->SetZeroEntryText("--"); m_Controls->m_StopImageBox->SetPredicate( mitk::NodePredicateAnd::New(isImagePredicate, dimensionPredicate) ); m_Controls->m_StopImageBox->SetZeroEntryText("--"); m_Controls->m_TargetImageBox->SetPredicate( mitk::NodePredicateAnd::New(isImagePredicate, dimensionPredicate) ); m_Controls->m_TargetImageBox->SetZeroEntryText("--"); connect( m_TrackingTimer, SIGNAL(timeout()), this, SLOT(TimerUpdate()) ); connect( m_Controls->commandLinkButton_2, SIGNAL(clicked()), this, SLOT(StopTractography()) ); connect( m_Controls->commandLinkButton, SIGNAL(clicked()), this, SLOT(DoFiberTracking()) ); connect( m_Controls->m_InteractiveBox, SIGNAL(stateChanged(int)), this, SLOT(ToggleInteractive()) ); connect( m_Controls->m_ModeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateGui()) ); connect( m_Controls->m_FaImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(DeleteTrackingHandler()) ); connect( m_Controls->m_ModeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(DeleteTrackingHandler()) ); connect( m_Controls->m_OutputProbMap, SIGNAL(stateChanged(int)), this, SLOT(OutputStyleSwitched()) ); connect( m_Controls->m_SeedImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_ModeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_StopImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_TargetImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_MaskImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_FaImageBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_ForestBox, SIGNAL(currentIndexChanged(int)), this, SLOT(ForestSwitched()) ); connect( m_Controls->m_ForestBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_SeedsPerVoxelBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_NumFibersBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_ScalarThresholdBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_OdfCutoffBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_StepSizeBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_SamplingDistanceBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_AngularThresholdBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_MinTractLengthBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_fBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_gBox, SIGNAL(valueChanged(double)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_NumSamplesBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_SeedRadiusBox, SIGNAL(valueChanged(double)), this, SLOT(InteractiveSeedChanged()) ); connect( m_Controls->m_NumSeedsBox, SIGNAL(valueChanged(int)), this, SLOT(InteractiveSeedChanged()) ); connect( m_Controls->m_OutputProbMap, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_SharpenOdfsBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_InterpolationBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_MaskInterpolationBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_FlipXBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_FlipYBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_FlipZBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_FrontalSamplesBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_StopVotesBox, SIGNAL(stateChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_LoopCheckBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_TrialsPerSeedBox, SIGNAL(valueChanged(int)), this, SLOT(OnParameterChanged()) ); connect( m_Controls->m_EpConstraintsBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnParameterChanged()) ); StartStopTrackingGui(false); } UpdateGui(); } void QmitkStreamlineTrackingView::StopTractography() { if (m_Tracker.IsNull()) return; m_Tracker->SetStopTracking(true); } void QmitkStreamlineTrackingView::TimerUpdate() { if (m_Tracker.IsNull()) return; QString status_text(m_Tracker->GetStatusText().c_str()); m_Controls->m_StatusTextBox->setText(status_text); } void QmitkStreamlineTrackingView::BeforeThread() { m_TrackingTimer->start(1000); } void QmitkStreamlineTrackingView::AfterThread() { m_TrackingTimer->stop(); if (!m_Tracker->GetUseOutputProbabilityMap()) { vtkSmartPointer fiberBundle = m_Tracker->GetFiberPolyData(); if (!m_Controls->m_InteractiveBox->isChecked() && fiberBundle->GetNumberOfLines() == 0) { QMessageBox warnBox; warnBox.setWindowTitle("Warning"); warnBox.setText("No fiberbundle was generated!"); warnBox.setDetailedText("No fibers were generated using the chosen parameters. Typical reasons are:\n\n- Cutoff too high. Some images feature very low FA/GFA/peak size. Try to lower this parameter.\n- Angular threshold too strict. Try to increase this parameter.\n- A small step sizes also means many steps to go wrong. Especially in the case of probabilistic tractography. Try to adjust the angular threshold."); warnBox.setIcon(QMessageBox::Warning); warnBox.exec(); if (m_InteractivePointSetNode.IsNotNull()) m_InteractivePointSetNode->SetProperty("color", mitk::ColorProperty::New(1,1,1)); StartStopTrackingGui(false); if (m_DeleteTrackingHandler) DeleteTrackingHandler(); UpdateGui(); return; } mitk::FiberBundle::Pointer fib = mitk::FiberBundle::New(fiberBundle); fib->SetReferenceGeometry(dynamic_cast(m_ParentNode->GetData())->GetGeometry()); if (m_Controls->m_ResampleFibersBox->isChecked() && fiberBundle->GetNumberOfLines()>0) fib->Compress(m_Controls->m_FiberErrorBox->value()); fib->ColorFibersByOrientation(); m_Tracker->SetDicomProperties(fib); if (m_Controls->m_InteractiveBox->isChecked()) { if (m_InteractiveNode.IsNull()) { m_InteractiveNode = mitk::DataNode::New(); QString name("Interactive"); m_InteractiveNode->SetName(name.toStdString()); GetDataStorage()->Add(m_InteractiveNode); } m_InteractiveNode->SetData(fib); m_InteractiveNode->SetFloatProperty("Fiber2DSliceThickness", m_Tracker->GetMinVoxelSize()/2); if (auto renderWindowPart = this->GetRenderWindowPart()) renderWindowPart->RequestUpdate(); } else { mitk::DataNode::Pointer node = mitk::DataNode::New(); node->SetData(fib); QString name("FiberBundle_"); name += m_ParentNode->GetName().c_str(); name += "_Streamline"; node->SetName(name.toStdString()); node->SetFloatProperty("Fiber2DSliceThickness", m_Tracker->GetMinVoxelSize()/2); GetDataStorage()->Add(node, m_ParentNode); } } else { TrackerType::ItkDoubleImgType::Pointer outImg = m_Tracker->GetOutputProbabilityMap(); mitk::Image::Pointer img = mitk::Image::New(); img->InitializeByItk(outImg.GetPointer()); img->SetVolume(outImg->GetBufferPointer()); if (m_Controls->m_InteractiveBox->isChecked()) { if (m_InteractiveNode.IsNull()) { m_InteractiveNode = mitk::DataNode::New(); QString name("Interactive"); m_InteractiveNode->SetName(name.toStdString()); GetDataStorage()->Add(m_InteractiveNode); } m_InteractiveNode->SetData(img); mitk::LookupTable::Pointer lut = mitk::LookupTable::New(); lut->SetType(mitk::LookupTable::JET_TRANSPARENT); mitk::LookupTableProperty::Pointer lut_prop = mitk::LookupTableProperty::New(); lut_prop->SetLookupTable(lut); m_InteractiveNode->SetProperty("LookupTable", lut_prop); m_InteractiveNode->SetProperty("opacity", mitk::FloatProperty::New(0.5)); m_InteractiveNode->SetFloatProperty("Fiber2DSliceThickness", m_Tracker->GetMinVoxelSize()/2); if (auto renderWindowPart = this->GetRenderWindowPart()) renderWindowPart->RequestUpdate(); } else { mitk::DataNode::Pointer node = mitk::DataNode::New(); node->SetData(img); QString name("ProbabilityMap_"); name += m_ParentNode->GetName().c_str(); node->SetName(name.toStdString()); mitk::LookupTable::Pointer lut = mitk::LookupTable::New(); lut->SetType(mitk::LookupTable::JET_TRANSPARENT); mitk::LookupTableProperty::Pointer lut_prop = mitk::LookupTableProperty::New(); lut_prop->SetLookupTable(lut); node->SetProperty("LookupTable", lut_prop); node->SetProperty("opacity", mitk::FloatProperty::New(0.5)); GetDataStorage()->Add(node, m_ParentNode); } } if (m_InteractivePointSetNode.IsNotNull()) m_InteractivePointSetNode->SetProperty("color", mitk::ColorProperty::New(1,1,1)); StartStopTrackingGui(false); if (m_DeleteTrackingHandler) DeleteTrackingHandler(); UpdateGui(); } void QmitkStreamlineTrackingView::InteractiveSeedChanged(bool posChanged) { if (m_ThreadIsRunning) return; if (!posChanged && (!m_Controls->m_InteractiveBox->isChecked() || !m_Controls->m_ParamUpdateBox->isChecked())) return; std::srand(std::time(0)); m_SeedPoints.clear(); itk::Point world_pos = this->GetRenderWindowPart()->GetSelectedPosition(); m_SeedPoints.push_back(world_pos); float radius = m_Controls->m_SeedRadiusBox->value(); int num = m_Controls->m_NumSeedsBox->value(); mitk::PointSet::Pointer pointset = mitk::PointSet::New(); pointset->InsertPoint(0, world_pos); m_InteractivePointSetNode->SetProperty("pointsize", mitk::FloatProperty::New(radius*2)); m_InteractivePointSetNode->SetProperty("point 2D size", mitk::FloatProperty::New(radius*2)); m_InteractivePointSetNode->SetData(pointset); for (int i=1; i p; p[0] = rand()%1000-500; p[1] = rand()%1000-500; p[2] = rand()%1000-500; p.Normalize(); p *= radius; m_SeedPoints.push_back(world_pos+p); } m_InteractivePointSetNode->SetProperty("color", mitk::ColorProperty::New(1,0,0)); DoFiberTracking(); } void QmitkStreamlineTrackingView::OnParameterChanged() { UpdateGui(); if (m_Controls->m_InteractiveBox->isChecked() && m_Controls->m_ParamUpdateBox->isChecked()) DoFiberTracking(); } void QmitkStreamlineTrackingView::ToggleInteractive() { UpdateGui(); m_Controls->m_SeedsPerVoxelBox->setEnabled(!m_Controls->m_InteractiveBox->isChecked()); m_Controls->m_SeedsPerVoxelLabel->setEnabled(!m_Controls->m_InteractiveBox->isChecked()); m_Controls->m_SeedImageBox->setEnabled(!m_Controls->m_InteractiveBox->isChecked()); m_Controls->label_6->setEnabled(!m_Controls->m_InteractiveBox->isChecked()); if ( m_Controls->m_InteractiveBox->isChecked() ) { - if (m_FirstInteractiveRun) - { - QMessageBox::information(nullptr, "Information", "Place and move a spherical seed region anywhere in the image by left-clicking and dragging. If the seed region is colored red, tracking is in progress. If the seed region is colored white, tracking is finished.\nPlacing the seed region for the first time in a newly selected dataset might cause a short delay, since the tracker needs to be initialized."); - m_FirstInteractiveRun = false; - } +// if (m_FirstInteractiveRun) +// { +// QMessageBox::information(nullptr, "Information", "Place and move a spherical seed region anywhere in the image by left-clicking and dragging. If the seed region is colored red, tracking is in progress. If the seed region is colored white, tracking is finished.\nPlacing the seed region for the first time in a newly selected dataset might cause a short delay, since the tracker needs to be initialized."); +// m_FirstInteractiveRun = false; +// } QApplication::setOverrideCursor(Qt::PointingHandCursor); QApplication::processEvents(); m_InteractivePointSetNode = mitk::DataNode::New(); m_InteractivePointSetNode->SetProperty("color", mitk::ColorProperty::New(1,1,1)); m_InteractivePointSetNode->SetName("InteractiveSeedRegion"); mitk::PointSetShapeProperty::Pointer shape_prop = mitk::PointSetShapeProperty::New(); shape_prop->SetValue(mitk::PointSetShapeProperty::PointSetShape::CIRCLE); m_InteractivePointSetNode->SetProperty("Pointset.2D.shape", shape_prop); GetDataStorage()->Add(m_InteractivePointSetNode); m_SliceChangeListener.RenderWindowPartActivated(this->GetRenderWindowPart()); connect(&m_SliceChangeListener, SIGNAL(SliceChanged()), this, SLOT(OnSliceChanged())); } else { QApplication::restoreOverrideCursor(); QApplication::processEvents(); m_InteractiveNode = nullptr; m_InteractivePointSetNode = nullptr; m_SliceChangeListener.RenderWindowPartActivated(this->GetRenderWindowPart()); disconnect(&m_SliceChangeListener, SIGNAL(SliceChanged()), this, SLOT(OnSliceChanged())); } } void QmitkStreamlineTrackingView::OnSliceChanged() { InteractiveSeedChanged(true); } void QmitkStreamlineTrackingView::SetFocus() { } void QmitkStreamlineTrackingView::DeleteTrackingHandler() { if (!m_ThreadIsRunning && m_TrackingHandler != nullptr) { delete m_TrackingHandler; m_TrackingHandler = nullptr; m_DeleteTrackingHandler = false; } else if (m_ThreadIsRunning) { m_DeleteTrackingHandler = true; } } void QmitkStreamlineTrackingView::ForestSwitched() { DeleteTrackingHandler(); } void QmitkStreamlineTrackingView::OutputStyleSwitched() { if (m_InteractiveNode.IsNotNull()) GetDataStorage()->Remove(m_InteractiveNode); m_InteractiveNode = nullptr; } void QmitkStreamlineTrackingView::OnSelectionChanged( berry::IWorkbenchPart::Pointer , const QList& nodes ) { std::vector< mitk::DataNode::Pointer > last_nodes = m_InputImageNodes; m_InputImageNodes.clear(); m_InputImages.clear(); m_AdditionalInputImages.clear(); bool retrack = false; for( auto node : nodes ) { if( node.IsNotNull() && dynamic_cast(node->GetData()) ) { if( dynamic_cast(node->GetData()) ) { m_InputImageNodes.push_back(node); m_InputImages.push_back(dynamic_cast(node->GetData())); retrack = true; } else if ( dynamic_cast(node->GetData()) ) { m_InputImageNodes.push_back(node); m_InputImages.push_back(dynamic_cast(node->GetData())); retrack = true; } else if ( mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage( dynamic_cast(node->GetData())) ) { m_InputImageNodes.push_back(node); m_InputImages.push_back(dynamic_cast(node->GetData())); retrack = true; } else { mitk::Image* img = dynamic_cast(node->GetData()); if (img!=nullptr) { int dim = img->GetDimension(); unsigned int* dimensions = img->GetDimensions(); if (dim==4 && dimensions[3]%3==0) { m_InputImageNodes.push_back(node); m_InputImages.push_back(dynamic_cast(node->GetData())); retrack = true; } else if (dim==3) { m_AdditionalInputImages.push_back(dynamic_cast(node->GetData())); } } } } } // sometimes the OnSelectionChanged event is sent twice and actually no selection has changed for the first event. We need to catch that. if (last_nodes.size() == m_InputImageNodes.size()) { bool same_nodes = true; for (unsigned int i=0; im_TensorImageLabel->setText("mandatory"); + m_Controls->m_TensorImageLabel->setText("select in data-manager"); m_Controls->m_fBox->setEnabled(false); m_Controls->m_fLabel->setEnabled(false); m_Controls->m_gBox->setEnabled(false); m_Controls->m_gLabel->setEnabled(false); - m_Controls->m_FaImageBox->setEnabled(false); - m_Controls->mFaImageLabel->setEnabled(false); + m_Controls->m_FaImageBox->setEnabled(true); + m_Controls->mFaImageLabel->setEnabled(true); m_Controls->m_OdfCutoffBox->setEnabled(false); m_Controls->m_OdfCutoffLabel->setEnabled(false); m_Controls->m_SharpenOdfsBox->setEnabled(false); - m_Controls->m_ForestBox->setEnabled(false); - m_Controls->m_ForestLabel->setEnabled(false); + m_Controls->m_ForestBox->setVisible(false); + m_Controls->m_ForestLabel->setVisible(false); m_Controls->commandLinkButton->setEnabled(false); m_Controls->m_TrialsPerSeedBox->setEnabled(false); m_Controls->m_TrialsPerSeedLabel->setEnabled(false); - m_Controls->m_TargetImageBox->setEnabled(false); - m_Controls->m_TargetImageLabel->setEnabled(false); + m_Controls->m_TargetImageBox->setVisible(false); + m_Controls->m_TargetImageLabel->setVisible(false); + + if (m_Controls->m_InteractiveBox->isChecked()) + { + m_Controls->m_InteractiveSeedingFrame->setVisible(true); + m_Controls->m_StaticSeedingFrame->setVisible(false); + m_Controls->commandLinkButton_2->setVisible(false); + m_Controls->commandLinkButton->setVisible(false); + } + else + { + m_Controls->m_InteractiveSeedingFrame->setVisible(false); + m_Controls->m_StaticSeedingFrame->setVisible(true); + m_Controls->commandLinkButton_2->setVisible(m_ThreadIsRunning); + m_Controls->commandLinkButton->setVisible(!m_ThreadIsRunning); + } if (m_Controls->m_EpConstraintsBox->currentIndex()>0) { - m_Controls->m_TargetImageBox->setEnabled(true); - m_Controls->m_TargetImageLabel->setEnabled(true); + m_Controls->m_TargetImageBox->setVisible(true); + m_Controls->m_TargetImageLabel->setVisible(true); } // trials per seed are only important for probabilistic tractography if (m_Controls->m_ModeBox->currentIndex()==1) { m_Controls->m_TrialsPerSeedBox->setEnabled(true); m_Controls->m_TrialsPerSeedLabel->setEnabled(true); } if(!m_InputImageNodes.empty()) { if (m_InputImageNodes.size()>1) m_Controls->m_TensorImageLabel->setText( ( std::to_string(m_InputImageNodes.size()) + " images selected").c_str() ); else m_Controls->m_TensorImageLabel->setText(m_InputImageNodes.at(0)->GetName().c_str()); - m_Controls->m_InputData->setTitle("Input Data"); m_Controls->commandLinkButton->setEnabled(!m_Controls->m_InteractiveBox->isChecked() && !m_ThreadIsRunning); m_Controls->m_ScalarThresholdBox->setEnabled(true); m_Controls->m_FaThresholdLabel->setEnabled(true); if ( dynamic_cast(m_InputImageNodes.at(0)->GetData()) ) { m_Controls->m_fBox->setEnabled(true); m_Controls->m_fLabel->setEnabled(true); m_Controls->m_gBox->setEnabled(true); m_Controls->m_gLabel->setEnabled(true); - m_Controls->mFaImageLabel->setEnabled(true); - m_Controls->m_FaImageBox->setEnabled(true); } else if ( dynamic_cast(m_InputImageNodes.at(0)->GetData()) ) { - m_Controls->mFaImageLabel->setEnabled(true); - m_Controls->m_FaImageBox->setEnabled(true); - m_Controls->m_OdfCutoffBox->setEnabled(true); m_Controls->m_OdfCutoffLabel->setEnabled(true); m_Controls->m_SharpenOdfsBox->setEnabled(true); } else if ( mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage( dynamic_cast(m_InputImageNodes.at(0)->GetData())) ) { - m_Controls->m_ForestBox->setEnabled(true); - m_Controls->m_ForestLabel->setEnabled(true); + m_Controls->m_ForestBox->setVisible(true); + m_Controls->m_ForestLabel->setVisible(true); m_Controls->m_ScalarThresholdBox->setEnabled(false); m_Controls->m_FaThresholdLabel->setEnabled(false); } } - else - m_Controls->m_InputData->setTitle("Please Select Input Data"); - } void QmitkStreamlineTrackingView::StartStopTrackingGui(bool start) { m_ThreadIsRunning = start; if (!m_Controls->m_InteractiveBox->isChecked()) { m_Controls->commandLinkButton_2->setVisible(start); m_Controls->commandLinkButton->setVisible(!start); m_Controls->m_InteractiveBox->setEnabled(!start); m_Controls->m_StatusTextBox->setVisible(start); } } void QmitkStreamlineTrackingView::DoFiberTracking() { if (m_ThreadIsRunning) return; if (m_InputImages.empty()) return; if (m_Controls->m_InteractiveBox->isChecked() && m_SeedPoints.empty()) return; StartStopTrackingGui(true); m_Tracker = TrackerType::New(); if( dynamic_cast(m_InputImageNodes.at(0)->GetData()) ) { typedef mitk::ImageToItk CasterType; if (m_Controls->m_ModeBox->currentIndex()==1) { if (m_InputImages.size()>1) { QMessageBox::information(nullptr, "Information", "Probabilistic tensor tractography is only implemented for single-tensor mode!"); StartStopTrackingGui(false); return; } - if (m_FirstTensorProbRun) - { - QMessageBox::information(nullptr, "Information", "Internally calculating ODF from tensor image and performing probabilistic ODF tractography. ODFs are sharpened (min-max normalized and raised to the power of 4). TEND parameters are ignored."); - m_FirstTensorProbRun = false; - } +// if (m_FirstTensorProbRun) +// { +// QMessageBox::information(nullptr, "Information", "Internally calculating ODF from tensor image and performing probabilistic ODF tractography. ODFs are sharpened (min-max normalized and raised to the power of 4). TEND parameters are ignored."); +// m_FirstTensorProbRun = false; +// } if (m_TrackingHandler==nullptr) { typedef mitk::ImageToItk< mitk::TrackingHandlerOdf::ItkOdfImageType > CasterType; m_TrackingHandler = new mitk::TrackingHandlerOdf(); mitk::TensorImage::ItkTensorImageType::Pointer itkImg = mitk::TensorImage::ItkTensorImageType::New(); mitk::CastToItkImage(m_InputImages.at(0), itkImg); typedef itk::TensorImageToOdfImageFilter< float, float > FilterType; FilterType::Pointer filter = FilterType::New(); filter->SetInput( itkImg ); filter->Update(); dynamic_cast(m_TrackingHandler)->SetOdfImage(filter->GetOutput()); if (m_Controls->m_FaImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer itkImg = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_FaImageBox->GetSelectedNode()->GetData()), itkImg); dynamic_cast(m_TrackingHandler)->SetGfaImage(itkImg); } } dynamic_cast(m_TrackingHandler)->SetGfaThreshold(m_Controls->m_ScalarThresholdBox->value()); dynamic_cast(m_TrackingHandler)->SetOdfThreshold(0); dynamic_cast(m_TrackingHandler)->SetSharpenOdfs(true); dynamic_cast(m_TrackingHandler)->SetIsOdfFromTensor(true); } else { if (m_TrackingHandler==nullptr) { m_TrackingHandler = new mitk::TrackingHandlerTensor(); for (int i=0; i<(int)m_InputImages.size(); i++) { typedef mitk::ImageToItk< mitk::TrackingHandlerTensor::ItkTensorImageType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(m_InputImages.at(i)); caster->Update(); mitk::TrackingHandlerTensor::ItkTensorImageType::ConstPointer itkImg = caster->GetOutput(); dynamic_cast(m_TrackingHandler)->AddTensorImage(itkImg); } if (m_Controls->m_FaImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer itkImg = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_FaImageBox->GetSelectedNode()->GetData()), itkImg); dynamic_cast(m_TrackingHandler)->SetFaImage(itkImg); } } dynamic_cast(m_TrackingHandler)->SetFaThreshold(m_Controls->m_ScalarThresholdBox->value()); dynamic_cast(m_TrackingHandler)->SetF((float)m_Controls->m_fBox->value()); dynamic_cast(m_TrackingHandler)->SetG((float)m_Controls->m_gBox->value()); } } else if ( dynamic_cast(m_InputImageNodes.at(0)->GetData()) ) { if (m_TrackingHandler==nullptr) { typedef mitk::ImageToItk< mitk::TrackingHandlerOdf::ItkOdfImageType > CasterType; m_TrackingHandler = new mitk::TrackingHandlerOdf(); mitk::TrackingHandlerOdf::ItkOdfImageType::Pointer itkImg = mitk::TrackingHandlerOdf::ItkOdfImageType::New(); mitk::CastToItkImage(m_InputImages.at(0), itkImg); dynamic_cast(m_TrackingHandler)->SetOdfImage(itkImg); if (m_Controls->m_FaImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer itkImg = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_FaImageBox->GetSelectedNode()->GetData()), itkImg); dynamic_cast(m_TrackingHandler)->SetGfaImage(itkImg); } } dynamic_cast(m_TrackingHandler)->SetGfaThreshold(m_Controls->m_ScalarThresholdBox->value()); dynamic_cast(m_TrackingHandler)->SetOdfThreshold(m_Controls->m_OdfCutoffBox->value()); dynamic_cast(m_TrackingHandler)->SetSharpenOdfs(m_Controls->m_SharpenOdfsBox->isChecked()); } else if ( mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage( dynamic_cast(m_InputImageNodes.at(0)->GetData())) ) { if ( m_Controls->m_ForestBox->GetSelectedNode().IsNull() ) { QMessageBox::information(nullptr, "Information", "Not random forest for machine learning based tractography (raw dMRI tractography) selected. Did you accidentally select the raw diffusion-weighted image in the datamanager?"); StartStopTrackingGui(false); return; } if (m_TrackingHandler==nullptr) { mitk::TractographyForest::Pointer forest = dynamic_cast(m_Controls->m_ForestBox->GetSelectedNode()->GetData()); mitk::Image::Pointer dwi = dynamic_cast(m_InputImageNodes.at(0)->GetData()); std::vector< std::vector< ItkFloatImageType::Pointer > > additionalFeatureImages; additionalFeatureImages.push_back(std::vector< ItkFloatImageType::Pointer >()); for (auto img : m_AdditionalInputImages) { ItkFloatImageType::Pointer itkimg = ItkFloatImageType::New(); mitk::CastToItkImage(img, itkimg); additionalFeatureImages.at(0).push_back(itkimg); } bool forest_valid = false; if (forest->GetNumFeatures()>=100) { int num_previous_directions = (forest->GetNumFeatures() - (100 + additionalFeatureImages.at(0).size()))/3; m_TrackingHandler = new mitk::TrackingHandlerRandomForest<6, 100>(); dynamic_cast*>(m_TrackingHandler)->AddDwi(dwi); dynamic_cast*>(m_TrackingHandler)->SetAdditionalFeatureImages(additionalFeatureImages); dynamic_cast*>(m_TrackingHandler)->SetForest(forest); dynamic_cast*>(m_TrackingHandler)->SetNumPreviousDirections(num_previous_directions); forest_valid = dynamic_cast*>(m_TrackingHandler)->IsForestValid(); } else { int num_previous_directions = (forest->GetNumFeatures() - (28 + additionalFeatureImages.at(0).size()))/3; m_TrackingHandler = new mitk::TrackingHandlerRandomForest<6, 28>(); dynamic_cast*>(m_TrackingHandler)->AddDwi(dwi); dynamic_cast*>(m_TrackingHandler)->SetAdditionalFeatureImages(additionalFeatureImages); dynamic_cast*>(m_TrackingHandler)->SetForest(forest); dynamic_cast*>(m_TrackingHandler)->SetNumPreviousDirections(num_previous_directions); forest_valid = dynamic_cast*>(m_TrackingHandler)->IsForestValid(); } if (!forest_valid) { QMessageBox::information(nullptr, "Information", "Random forest is invalid. The forest signatue does not match the parameters of TrackingHandlerRandomForest."); StartStopTrackingGui(false); return; } } } else { if (m_Controls->m_ModeBox->currentIndex()==1) { QMessageBox::information(nullptr, "Information", "Probabilstic tractography is not implemented for peak images."); StartStopTrackingGui(false); return; } try { if (m_TrackingHandler==nullptr) { typedef mitk::ImageToItk< mitk::TrackingHandlerPeaks::PeakImgType > CasterType; CasterType::Pointer caster = CasterType::New(); caster->SetInput(m_InputImages.at(0)); caster->Update(); mitk::TrackingHandlerPeaks::PeakImgType::Pointer itkImg = caster->GetOutput(); m_TrackingHandler = new mitk::TrackingHandlerPeaks(); dynamic_cast(m_TrackingHandler)->SetPeakImage(itkImg); } dynamic_cast(m_TrackingHandler)->SetPeakThreshold(m_Controls->m_ScalarThresholdBox->value()); } catch(...) { QMessageBox::information(nullptr, "Error", "Peak tracker could not be initialized. Is your input image in the correct format (4D float image, peaks in the 4th dimension)?"); StartStopTrackingGui(false); return; } } m_TrackingHandler->SetFlipX(m_Controls->m_FlipXBox->isChecked()); m_TrackingHandler->SetFlipY(m_Controls->m_FlipYBox->isChecked()); m_TrackingHandler->SetFlipZ(m_Controls->m_FlipZBox->isChecked()); m_TrackingHandler->SetInterpolate(m_Controls->m_InterpolationBox->isChecked()); switch (m_Controls->m_ModeBox->currentIndex()) { case 0: m_TrackingHandler->SetMode(mitk::TrackingDataHandler::MODE::DETERMINISTIC); break; case 1: m_TrackingHandler->SetMode(mitk::TrackingDataHandler::MODE::PROBABILISTIC); break; default: m_TrackingHandler->SetMode(mitk::TrackingDataHandler::MODE::DETERMINISTIC); } if (m_Controls->m_InteractiveBox->isChecked()) { m_Tracker->SetSeedPoints(m_SeedPoints); } else if (m_Controls->m_SeedImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer mask = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_SeedImageBox->GetSelectedNode()->GetData()), mask); m_Tracker->SetSeedImage(mask); } if (m_Controls->m_MaskImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer mask = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_MaskImageBox->GetSelectedNode()->GetData()), mask); m_Tracker->SetMaskImage(mask); } if (m_Controls->m_StopImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer mask = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_StopImageBox->GetSelectedNode()->GetData()), mask); m_Tracker->SetStoppingRegions(mask); } if (m_Controls->m_TargetImageBox->GetSelectedNode().IsNotNull()) { ItkFloatImageType::Pointer mask = ItkFloatImageType::New(); mitk::CastToItkImage(dynamic_cast(m_Controls->m_TargetImageBox->GetSelectedNode()->GetData()), mask); m_Tracker->SetTargetRegions(mask); } // Endpoint constraints switch (m_Controls->m_EpConstraintsBox->currentIndex()) { case 0: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::NONE); m_Tracker->SetTargetRegions(nullptr); break; case 1: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_TARGET); break; case 2: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_TARGET_LABELDIFF); break; case 3: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_SEED_AND_TARGET); break; case 4: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::MIN_ONE_EP_IN_TARGET); break; case 5: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::ONE_EP_IN_TARGET); break; case 6: m_Tracker->SetEndpointConstraint(itk::StreamlineTrackingFilter::EndpointConstraints::NO_EP_IN_TARGET); break; } if (m_Tracker->GetEndpointConstraint()!=itk::StreamlineTrackingFilter::EndpointConstraints::NONE && m_Controls->m_TargetImageBox->GetSelectedNode().IsNull()) { QMessageBox::information(nullptr, "Error", "Endpoint constraints are used but no target image is set!"); StartStopTrackingGui(false); return; } else if (m_Tracker->GetEndpointConstraint()==itk::StreamlineTrackingFilter::EndpointConstraints::EPS_IN_SEED_AND_TARGET && (m_Controls->m_SeedImageBox->GetSelectedNode().IsNull()|| m_Controls->m_TargetImageBox->GetSelectedNode().IsNull()) ) { QMessageBox::information(nullptr, "Error", "Endpoint constraint EPS_IN_SEED_AND_TARGET is used but no target or no seed image is set!"); StartStopTrackingGui(false); return; } m_Tracker->SetInterpolateMasks(m_Controls->m_MaskInterpolationBox->isChecked()); m_Tracker->SetVerbose(!m_Controls->m_InteractiveBox->isChecked()); m_Tracker->SetSeedsPerVoxel(m_Controls->m_SeedsPerVoxelBox->value()); m_Tracker->SetStepSize(m_Controls->m_StepSizeBox->value()); m_Tracker->SetSamplingDistance(m_Controls->m_SamplingDistanceBox->value()); m_Tracker->SetUseStopVotes(m_Controls->m_StopVotesBox->isChecked()); m_Tracker->SetOnlyForwardSamples(m_Controls->m_FrontalSamplesBox->isChecked()); m_Tracker->SetTrialsPerSeed(m_Controls->m_TrialsPerSeedBox->value()); m_Tracker->SetMaxNumTracts(m_Controls->m_NumFibersBox->value()); m_Tracker->SetNumberOfSamples(m_Controls->m_NumSamplesBox->value()); m_Tracker->SetTrackingHandler(m_TrackingHandler); m_Tracker->SetLoopCheck(m_Controls->m_LoopCheckBox->value()); m_Tracker->SetAngularThreshold(m_Controls->m_AngularThresholdBox->value()); m_Tracker->SetMinTractLength(m_Controls->m_MinTractLengthBox->value()); m_Tracker->SetUseOutputProbabilityMap(m_Controls->m_OutputProbMap->isChecked()); m_ParentNode = m_InputImageNodes.at(0); m_TrackingThread.start(QThread::LowestPriority); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingViewControls.ui index bca8658d44..b608549608 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingViewControls.ui +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/QmitkStreamlineTrackingViewControls.ui @@ -1,1244 +1,1398 @@ QmitkStreamlineTrackingViewControls 0 0 - 413 - 1385 + 453 + 859 0 0 QmitkTemplate - - - 0 - - - 0 - + 3 3 - - - - Please Select Input Data + + 0 + + + 40 + + + + + QFrame::NoFrame + + + QFrame::Raised - + 0 - 0 + 15 0 0 - - - - Input Image. ODF, tensor and peak images are currently supported. - - - Input Image: - - - - - - - Random forest for machine learning based tractography. - - - QComboBox::AdjustToMinimumContentsLength - - - - - - - - - - - - - - - - FA/GFA Image: - - - + + 6 + + + 15 + - - - - - - Seed Image: + + + true - - - - - - Seed points are only placed inside the mask image. If no seed mask is selected, the whole image is seeded. + + + 0 + 0 + - - QComboBox::AdjustToMinimumContentsLength + + true - - - - - - - - - - Fibers that enter a region defined in this image will stop immediately. + + + + QFrame::NoFrame - - QComboBox::AdjustToMinimumContentsLength + + QFrame::Raised - - - - + + + 0 - - - - - - - Fibers that do not start and end in a region defined in this image or the seed image will be discarded. - - - QComboBox::AdjustToMinimumContentsLength - - - - - + + 0 + + + 0 + + + 0 - + + + + Input Image. ODF, tensor and peak images are currently supported. + + + Input Image: + + + + + + + Input Image. ODF, tensor, peak, and, in case of ML tractography, raw diffusion-weighted images are currently supported. + + + <html><head/><body><p><span style=" color:#ff0000;">select image in data-manager</span></p></body></html> + + + true + + + + + + + + + + Tractography Forest: + + + + + + + Random forest for machine learning based tractography. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + + + + + - - - - - - Mask Image: - - - - - - - Input Image. ODF, tensor, peak, and, in case of ML tractography, raw diffusion-weighted images are currently supported. - - - <html><head/><body><p><span style=" color:#ff0000;">mandatory</span></p></body></html> - - + + true - - - - - + Stop tractography and return all fibers reconstructed until now. - Target Image: - - - - - - - Tractography is only performed inside the mask image. Fibers that leave the mask image are stopped. + Stop Tractography - - QComboBox::AdjustToMinimumContentsLength - - - - - - - - - - - - - Stop Image: - - - - - - - + + + false - Tractography Forest: + Start Tractography - - - - If an image is selected, the stopping criterion is not calculated from the input image but instead the selected image is used. - - - QComboBox::AdjustToMinimumContentsLength - - + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + 0 + + + + + 0 + 0 + 435 + 297 + + + + Seeding + + + Specify how, where and how many tractography seed points are placed. + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Number of seed points equally distributed around selected position. + + + 1 + + + 9999999 + + + 50 + + + + + + + + + + Radius: + + + + + + + Seedpoints are equally distributed within a sphere centered at the selected position with the specified radius (in mm). + + + 2 + + + 50.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + + + + + Num. Seeds: + + + + + + + + + + true + + + When checked, parameter changes cause instant retracking while in interactive mode. + + + Update on Parameter Change + + + true + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Try each seed N times until a valid streamline is obtained (only for probabilistic tractography). + + + Minimum fiber length (in mm) + + + 1 + + + 999 + + + 10 + + + + + + + + + + Trials Per Seed: + + + + + + + + + + Max. Num. Fibers: + + + + + + + Tractography is stopped after the desired number of fibers is reached, even before all seed points are processed (-1 means no limit). + + + -1 + + + 999999999 + + + -1 + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Number of seed points placed in each voxel. + + + 1 + + + 9999999 + + + + + + + + + + Seeds per Voxel: + + + + + + + Seed points are only placed inside the regions defined in the seed image. If no seed image is selected, the whole image is seeded. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + + + + + + + + + + + Seed Image: + + + + + + + + + + true + + + Dynamically pick a seed location by click into image. + - - + Enable Interactive Tractography + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + 0 + 0 + 435 + 297 + + + + ROI Constraints + + + Specify various ROI and mask images to constrain the tractography process. + + + + + + - - - - - - - - - - Endpoint Constraints: - - - - - - - Fibers that enter a region defined in this image will stop immediately. - - - QComboBox::AdjustToMinimumContentsLength - - - No Constraints on EP locations + Target Image: + + + + + + + Select which fibers should be accepted or rejected based on the location of their endpoints. + + + QComboBox::AdjustToMinimumContentsLength + + + + No Constraints on EP locations + + + + + Both EPs in Target Image + + + + + Both EPs in Target Image But Different Label + + + + + One EP in Seed Image and One EP in Target Image + + + + + At Least One EP in Target Image + + + + + Exactly One EP in Target Image + + + + + No EP in Target Image + + + + + + + + - - - Both EPs in Target Image + Stop Image: + + + + + + + - - - Both EPs in Target Image But Different Label + Mask Image: + + + + + + + The target image is used for the endpoint constraint strategy defined above. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + + + + + + + + - - - One EP in Seed Image and One EP in Target Image + Endpoint Constraints: + + + + + + + Fibers that leave the regions defined in this image will stop immediately. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + + + + + + + + Fibers that enter a region defined in this image will stop immediately. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Tractography Parameters + + + Specify the behavior of the tractography at each streamline integration step (step size, deterministic/probabilistic, ...). + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). + + + 2 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.000000000000000 + + + + + + + Toggle between deterministic and probabilistic tractography. Some modes might not be available for all types of tractography. + + + + Deterministic + + + + + Probabilistic + + + + + + + + - - - At Least One EP in Target Image + Cutoff: + + + + + + + - - - Exactly One EP in Target Image + FA/GFA Image: + + + + + + + - - - No EP in Target Image + Mode: - - - - - - - - - - false - - - Start Tractography - - - - - - - - 0 - 0 - - - - Interactive Tractography - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Number of seed points normally distributed around selected position. - - - 1 - - - 9999999 - - - 50 - - - - - - - - - - Num. Seeds: - - - - - - - true - - - Dynamically pick seed location by click into image. - - - Enable Interactive Tractography - - - - - - - Seedpoints are normally distributed within a sphere centered at the selected position with the specified radius (in mm). - - - 2 - - - 50.000000000000000 - - - 0.100000000000000 - - - 2.500000000000000 - - - - - - - - - - Radius: - - - - - - - true - - - When checked, parameter changes cause instant retracking while in interactive mode. - - - Update on Parameter Change - - - true - - - - - - - - - - - 0 - 0 - - - - Parameters - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - Mode: - - - - - - - Toggle between deterministic and probabilistic tractography. Some modes might not be available for all types of tractography. - - - - Deterministic + + + + + + - - - Probabilistic + Angular Threshold: - - - - - - - - - - Seeds per Voxel: - - - - - - - Number of seed points placed in each voxel. - - - 1 - - - 9999999 - - - - - - - - - - Max. num. fibers: - - - - - - - Tractography is stopped after the desired number of fibers is reached, even before all seed points are processed. - - - -1 - - - 999999999 - - - -1 - - - - - - - - - - Cutoff: - - - - - - - Threshold on peak magnitude, FA, GFA, ... - - - 5 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.100000000000000 - - - - - - - - - - ODF Cutoff: - - - - - - - Additional threshold on the ODF magnitude. This is useful in case of CSD fODF tractography. - - - 5 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.100000000000000 - - - - - - - If you are using dODF images as input, it is advisable to sharpen the ODFs (min-max normalize and raise to the power of 4). This is not necessary for CSD fODFs, since they are naturally much sharper. - - - Sharpen ODFs - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 200 - 0 - - - - - - - - - - - Advanced Parameters - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 + + + + + + Step size (in voxels) - - 0 + + 2 - - 0 + + 0.010000000000000 - - 0 + + 10.000000000000000 - - - - f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). - - - 2 - - - 1.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Default: 90° * step_size - - - -1 - - - 90 - - - 1 - - - -1 - - - - - - - Try each seed N times until a valid streamline is obtained (only for probabilistic). - - - Minimum fiber length (in mm) - - - 1 - - - 999 - - - 10 - - - - - - - f parameter of tensor tractography. f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). - - - f: - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Internally flips progression directions. This might be necessary depending on the input data. - - - x - - - - - - - Internally flips progression directions. This might be necessary depending on the input data. - - - y - - - - - - - Internally flips progression directions. This might be necessary depending on the input data. - - - z - - - - - - - - - - - - - Flip directions: - - - - - - - - - - Angular Threshold: - - - - - - - f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). - - - 2 - - - 1.000000000000000 - - - 0.100000000000000 - - - 0.000000000000000 - - - - - - - Step size (in voxels) - - - 2 - - - 0.010000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 0.500000000000000 - - - - - - - - - - Min. Tract Length: - - - - - - - - - - Step Size: - - - - - - - - - - Trials Per Seed: - - - - - - - Shorter fibers are discarded. - - - Minimum fiber length (in mm) - - - 1 - - - 999.000000000000000 - - - 1.000000000000000 - - - 20.000000000000000 - - - - - - - - - - g: - - - - - - - - - - Loop Check: - - - - - - - Shorter fibers are discarded. - - - Maximum allowed angular SDTEV over 4 voxel lengths. Default: no loop check. - - - -1 - - - 180 - - - -1 - - + + 0.100000000000000 + + + 0.500000000000000 + + + + + + + Maximum allowed angular SDTEV over 4 voxel lengths. Default: no loop check. + + + + + + -1 + + + 180 + + + -1 + + + + + + + If an image is selected, the stopping criterion is not calculated from the input image but instead the selected image is used. + + + QComboBox::AdjustToMinimumContentsLength + + + + - + - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 + + + + + + + + + Step Size: + + + + + + + Additional threshold on the ODF magnitude. This is useful in case of CSD fODF tractography. For fODFs a good default value is 0.1, for normalized dODFs, e.g. Q-ball ODFs, this threshold should be very low (0.00025) or 0. + + + 5 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.000250000000000 + + + + + + + f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). + + + 2 + + + 1.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + If you are using dODF images as input, it is advisable to sharpen the ODFs (min-max normalize and raise to the power of 4). This is not necessary for CSD fODFs, since they are naturally much sharper. + + + + + + + + + + f parameter of tensor tractography. f=1 + g=0 means FACT (depending on the chosen interpolation). f=0 and g=1 means TEND (disable interpolation for this mode!). + + + f: + + + + + + + + + + Min. Tract Length: + + + + + + + Threshold on peak magnitude, FA, GFA, ... + + + 5 + + + 1.000000000000000 + + + 0.100000000000000 + + + 0.100000000000000 + + + + + + + + + + ODF Cutoff: + + + + + + + Minimum tract length in mm. Shorter fibers are discarded. + + + Minimum fiber length (in mm) + + + 1 + + + 999.000000000000000 + + + 1.000000000000000 + + + 20.000000000000000 + + + + + + + + + + Loop Check: + + + + + + + Angular threshold between two steps (in degree). Default: 90° * step_size + + + -1 - - 0 + + 90 - - 0 + + 1 - - 0 + + -1 - - - - If false, nearest neighbor interpolation is used. - - - Interpolate Tractography Data - - - true - - - - - - - The tractography mask is not interpolated by default. - - - Interpolate ROI Images - - - true - - - - - - - - - - - - - - 0 - 0 - - - - Neighborhood Sampling - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 + + + + + + - - 0 + + g: - - 0 + + + + + + - - 0 + + Sharpen ODFs: - - - - - - - Num. Samples: - - - - - - - Number of neighborhood samples that are used to determine the next fiber progression direction. - - - 50 - - - - - - - - - - Sampling Distance: - - - - - - - Sampling distance (in voxels) - - - 2 - - - 10.000000000000000 - - - 0.100000000000000 - - - 0.250000000000000 - - - - - - - - - - Only neighborhood samples in front of the current streamline position are considered. - - - Use Only Frontal Samples - - - false - - - - - - - If checked, the majority of sampling points has to place a stop-vote for the streamline to terminate. If not checked, all sampling positions have to vote for a streamline termination. - - - Use Stop-Votes - - - false - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 220 - - - - - - - - - 0 - 0 - - - - Output and Postprocessing - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 + + + + + + + Neighborhood Sampling + + + Specify if and how information about the current streamline neighborhood should be used. + + + + + + Only neighborhood samples in front of the current streamline position are considered. - - 0 + + Use Only Frontal Samples - - 0 + + false - - 0 + + + + + + If checked, the majority of sampling points has to place a stop-vote for the streamline to terminate. If not checked, all sampling positions have to vote for a streamline termination. - - - - Resample fibers using the specified error constraint. - - - Compress Fibers - - - true - - - - - - - Qt::StrongFocus - - - Lossy fiber compression. Recommended for large tractograms. Maximum error in mm. - - - 3 - - - 10.000000000000000 - - - 0.010000000000000 - - - 0.100000000000000 - - - - - - - - - - Output probability map instead of tractogram. - - - Output Probability Map - - - false - - - - - - - - - - true - - - Stop Tractography - - - - - - - true - - - - 0 - 0 - - - - true - + + Use Stop-Votes + + + false + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + Num. Samples: + + + + + + + Number of neighborhood samples that are used to determine the next fiber progression direction. + + + 50 + + + + + + + + + + Sampling Distance: + + + + + + + Sampling distance (in voxels) + + + 2 + + + 10.000000000000000 + + + 0.100000000000000 + + + 0.250000000000000 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Data Handling + + + Specify interpolation and direction flips. + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Trilinearly interpolate the input image used for tractography. + + + Interpolate Tractography Data + + + true + + + + + + + Trilinearly interpolate the ROI images used to constrain the tractography. + + + Interpolate ROI Images + + + true + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Internally flips progression directions. This might be necessary depending on the input data. + + + x + + + + + + + Internally flips progression directions. This might be necessary depending on the input data. + + + y + + + + + + + Internally flips progression directions. This might be necessary depending on the input data. + + + z + + + + + + + + + + + + + Flip directions: + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Output and Postprocessing + + + Specify the tractography output (streamlines or probability maps) and postprocessing steps. + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Compress fibers using the specified error constraint. + + + Compress Fibers + + + true + + + + + + + Qt::StrongFocus + + + Lossy fiber compression. Recommended for large tractograms. Maximum error in mm. + + + 3 + + + 10.000000000000000 + + + 0.010000000000000 + + + 0.100000000000000 + + + + + + + + + + Output map with voxel-wise visitation counts instead of streamlines. + + + Output Probability Map + + + false + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + QmitkDataStorageComboBox QComboBox
QmitkDataStorageComboBox.h
QmitkDataStorageComboBoxWithSelectNone QComboBox
QmitkDataStorageComboBoxWithSelectNone.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/mitkPluginActivator.cpp index 7e265b7c98..d5ad628635 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/mitkPluginActivator.cpp @@ -1,51 +1,49 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPluginActivator.h" #include "src/internal/Perspectives/QmitkGibbsTractographyPerspective.h" #include "src/internal/Perspectives/QmitkStreamlineTractographyPerspective.h" -#include "src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.h" #include "src/internal/QmitkGibbsTrackingView.h" #include "src/internal/QmitkStreamlineTrackingView.h" #include "src/internal/QmitkMLBTView.h" ctkPluginContext* mitk::PluginActivator::m_Context = nullptr; ctkPluginContext* mitk::PluginActivator::GetContext() { return m_Context; } void mitk::PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkGibbsTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkStreamlineTractographyPerspective, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkMachineLearningTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkGibbsTrackingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkStreamlineTrackingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkMLBTView, context) m_Context = context; } void mitk::PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) m_Context = nullptr; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake index 624eea1730..f8797c5460 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/files.cmake @@ -1,62 +1,65 @@ set(SRC_CPP_FILES ) set(INTERNAL_CPP_FILES mitkPluginActivator.cpp QmitkDiffusionDicomImportView.cpp QmitkControlVisualizationPropertiesView.cpp QmitkDicomTractogramTagEditorView.cpp Perspectives/QmitkDiffusionDefaultPerspective.cpp + Perspectives/QmitkSegmentationPerspective.cpp ) set(UI_FILES src/internal/QmitkDiffusionDicomImportViewControls.ui src/internal/QmitkControlVisualizationPropertiesViewControls.ui src/internal/QmitkDicomTractogramTagEditorViewControls.ui ) set(MOC_H_FILES src/internal/mitkPluginActivator.h src/internal/QmitkDiffusionDicomImportView.h src/internal/QmitkControlVisualizationPropertiesView.h src/internal/QmitkDicomTractogramTagEditorView.h src/internal/Perspectives/QmitkDiffusionDefaultPerspective.h + src/internal/Perspectives/QmitkSegmentationPerspective.h ) set(CACHED_RESOURCE_FILES # list of resource files which can be used by the plug-in # system without loading the plug-ins shared library, # for example the icon used in the menu and tabs for the # plug-in views in the workbench plugin.xml resources/dwiimport.png resources/vizControls.png resources/arrow.png resources/dwi.png resources/odf.png resources/tensor.png resources/tractogram.png resources/odf_peaks.png resources/ml_tractogram.png resources/refresh.xpm + resources/segmentation.svg ) set(QRC_FILES # uncomment the following line if you want to use Qt resources resources/QmitkDiffusionImaging.qrc #resources/QmitkTractbasedSpatialStatisticsView.qrc ) set(CPP_FILES ) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml index c7985e2611..c08090a4e7 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/plugin.xml @@ -1,50 +1,60 @@ + + + + This perspective contains views to perform manual image segmentation. + + + Diffusion DICOM data import diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/resources/QmitkDiffusionImaging.qrc b/Plugins/org.mitk.gui.qt.diffusionimaging/resources/QmitkDiffusionImaging.qrc index cd94502f0b..edee859a05 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/resources/QmitkDiffusionImaging.qrc +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/resources/QmitkDiffusionImaging.qrc @@ -1,31 +1,32 @@ dwi.png dwiimport.png texIntONIcon.png texIntOFFIcon.png vizControls.png Refresh_48.png glyphsoff_C.png glyphsoff_S.png glyphsoff_T.png glyphson_C.png glyphson_S.png glyphson_T.png color24.gif color48.gif color64.gif crosshair.png paint2.png reset.png MapperEfx2D.png refresh.xpm tensor.png tractogram.png ml_tractogram.png ConnectomicsNetwork.png odf.png DiffData24.png odf_peaks.png + segmentation.svg diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/resources/segmentation.svg b/Plugins/org.mitk.gui.qt.diffusionimaging/resources/segmentation.svg new file mode 100644 index 0000000000..1ba1aa7f2d --- /dev/null +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/resources/segmentation.svg @@ -0,0 +1,1980 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.cpp similarity index 87% rename from Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.cpp rename to Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.cpp index 9d899f42e0..d2b5bc791f 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.tractography/src/internal/Perspectives/QmitkMachineLearningTractographyPerspective.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.cpp @@ -1,50 +1,49 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "QmitkMachineLearningTractographyPerspective.h" +#include "QmitkSegmentationPerspective.h" #include "berryIViewLayout.h" -void QmitkMachineLearningTractographyPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) +void QmitkSegmentationPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { ///////////////////////////////////////////////////// // all di-app perspectives should have the following: ///////////////////////////////////////////////////// QString editorArea = layout->GetEditorArea(); layout->AddStandaloneViewPlaceholder("org.mitk.views.viewnavigatorview", berry::IPageLayout::LEFT, 0.3f, editorArea, false); layout->AddStandaloneView("org.mitk.views.datamanager", false, berry::IPageLayout::LEFT, 0.3f, editorArea); layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", false, berry::IPageLayout::BOTTOM, .15f, "org.mitk.views.datamanager"); berry::IFolderLayout::Pointer left = layout->CreateFolder("org.mbi.diffusionimaginginternal.leftcontrols", berry::IPageLayout::BOTTOM, 0.15f, "org.mitk.views.controlvisualizationpropertiesview"); layout->AddStandaloneViewPlaceholder("org.mitk.views.imagenavigator", berry::IPageLayout::BOTTOM, .7f, "org.mbi.diffusionimaginginternal.leftcontrols", false); ///////////////////////////////////////////// // here goes the perspective specific stuff ///////////////////////////////////////////// - left->AddView("org.mitk.views.mlbtview"); left->AddView("org.mitk.views.segmentation"); - left->AddView("org.mitk.views.diffusionpreprocessing"); + left->AddView("org.mitk.views.segmentationutilities"); } diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.h similarity index 69% rename from Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h rename to Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.h index c89a61672e..6be030c56a 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging.registration/src/internal/QmitkDwiRegistrationPerspective.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/Perspectives/QmitkSegmentationPerspective.h @@ -1,36 +1,36 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef QmitkDwiRegistrationPerspective_H_ -#define QmitkDwiRegistrationPerspective_H_ +#ifndef QmitkSegmentationPerspective_H_ +#define QmitkSegmentationPerspective_H_ #include -class QmitkDwiRegistrationPerspective : public QObject, public berry::IPerspectiveFactory +class QmitkSegmentationPerspective : public QObject, public berry::IPerspectiveFactory { Q_OBJECT Q_INTERFACES(berry::IPerspectiveFactory) public: - QmitkDwiRegistrationPerspective() {} - ~QmitkDwiRegistrationPerspective() {} + QmitkSegmentationPerspective() {} + ~QmitkSegmentationPerspective() {} void CreateInitialLayout(berry::IPageLayout::Pointer layout) override; }; -#endif /* QmitkFiberProcessingPerspective_H_ */ +#endif /* QmitkSegmentationPerspective_H_ */ diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp index 5c1b930cb7..fa8f61b734 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp @@ -1,73 +1,75 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkPluginActivator.h" #include "src/internal/Perspectives/QmitkDiffusionDefaultPerspective.h" +#include "src/internal/Perspectives/QmitkSegmentationPerspective.h" #include "src/internal/QmitkDiffusionDicomImportView.h" #include "src/internal/QmitkDicomTractogramTagEditorView.h" #include "src/internal/QmitkControlVisualizationPropertiesView.h" #include "QmitkNodeDescriptorManager.h" #include "mitkNodePredicateDataType.h" #include "mitkNodePredicateProperty.h" #include "mitkNodePredicateIsDWI.h" #include namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionDefaultPerspective, context) + BERRY_REGISTER_EXTENSION_CLASS(QmitkSegmentationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionDicomImport, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomTractogramTagEditorView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkControlVisualizationPropertiesView, context) // Q_UNUSED(context) QmitkNodeDescriptorManager* manager = QmitkNodeDescriptorManager::GetInstance(); mitk::NodePredicateIsDWI::Pointer isDiffusionImage = mitk::NodePredicateIsDWI::New(); QmitkNodeDescriptor* desc = new QmitkNodeDescriptor(QObject::tr("DiffusionImage"), QString(":/QmitkDiffusionImaging/DiffData24.png"), isDiffusionImage, manager); manager->AddDescriptor(desc); mitk::NodePredicateDataType::Pointer isTensorImage = mitk::NodePredicateDataType::New("TensorImage"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("TensorImage"), QString(":/QmitkDiffusionImaging/tensor.png"), isTensorImage, manager)); mitk::NodePredicateDataType::Pointer isOdfImage = mitk::NodePredicateDataType::New("OdfImage"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("OdfImage"), QString(":/QmitkDiffusionImaging/odf.png"), isOdfImage, manager)); mitk::NodePredicateDataType::Pointer isFiberBundle = mitk::NodePredicateDataType::New("FiberBundle"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("FiberBundle"), QString(":/QmitkDiffusionImaging/tractogram.png"), isFiberBundle, manager)); mitk::NodePredicateDataType::Pointer isPeakImage = mitk::NodePredicateDataType::New("PeakImage"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("PeakImage"), QString(":/QmitkDiffusionImaging/odf_peaks.png"), isPeakImage, manager)); mitk::NodePredicateDataType::Pointer isConnectomicsNetwork = mitk::NodePredicateDataType::New("ConnectomicsNetwork"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("ConnectomicsNetwork"), QString(":/QmitkDiffusionImaging/ConnectomicsNetwork.png"), isConnectomicsNetwork, manager)); mitk::NodePredicateDataType::Pointer isTractographyForestNetwork = mitk::NodePredicateDataType::New("TractographyForest"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("TractographyForest"), QString(":/QmitkDiffusionImaging/ml_tractogram.png"), isTractographyForestNetwork, manager)); } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake index f1f9f6b993..2e6976a06e 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake @@ -1,66 +1,47 @@ set(SRC_CPP_FILES QmitkDiffusionImagingAppApplication.cpp QmitkDiffusionImagingAppWorkbenchAdvisor.cpp ) set(INTERNAL_CPP_FILES QmitkDiffusionApplicationPlugin.cpp QmitkDiffusionImagingAppIntroPart.cpp Perspectives/QmitkWelcomePerspective.cpp ) set(UI_FILES src/internal/QmitkWelcomeScreenViewControls.ui ) set(MOC_H_FILES src/internal/QmitkDiffusionImagingAppIntroPart.h src/internal/QmitkDiffusionApplicationPlugin.h src/QmitkDiffusionImagingAppApplication.h src/internal/Perspectives/QmitkWelcomePerspective.h ) set(CACHED_RESOURCE_FILES # list of resource files which can be used by the plug-in # system without loading the plug-ins shared library, # for example the icon used in the menu and tabs for the # plug-in views in the workbench plugin.xml - resources/icon_dicom.xpm - resources/diffusionimaging.png - resources/preprocessing.png - resources/Measurement_48.png - resources/volvis.png - resources/perspectives/diffusionimaging.png - resources/perspectives/icon_home.png - resources/perspectives/connectomics.png - resources/perspectives/dicomimport.png - resources/perspectives/preprocessingreconstruction.png - resources/perspectives/quantification.png - resources/perspectives/tbss.png - resources/perspectives/utilities.png - resources/perspectives/imageProcessing.png - resources/perspectives/registration.png - resources/perspectives/phantomData2.png - resources/perspectives/eye.png - resources/perspectives/registration.xpm - resources/perspectives/chart.png - resources/perspectives/preprocessing.png + resources/icon_home.png ) set(QRC_FILES # uncomment the following line if you want to use Qt resources resources/welcome/QmitkWelcomeScreenView.qrc resources/org_mitk_gui_qt_diffusionimagingapp.qrc ) # set(CPP_FILES) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml index f3ed00e11e..e0b8a0b82e 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml @@ -1,49 +1,49 @@ + icon="resources/icon_home.png"/> diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/ImageProcessing_48.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/ImageProcessing_48.png deleted file mode 100644 index b0244a0320..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/ImageProcessing_48.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/Measurement_48.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/Measurement_48.png deleted file mode 100644 index 3907445ef6..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/Measurement_48.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/RigidRegistration.xpm b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/RigidRegistration.xpm deleted file mode 100644 index 51a5f9c4bb..0000000000 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/RigidRegistration.xpm +++ /dev/null @@ -1,231 +0,0 @@ -/* XPM */ -static char *RigidRegistration___[] = { -/* columns rows colors chars-per-pixel */ -"48 48 177 2", -" c #6F5F67", -". c #735C62", -"X c #5B6B74", -"o c #577076", -"O c #587177", -"+ c #5C747B", -"@ c #5D797F", -"# c #796167", -"$ c #71636B", -"% c #7F656B", -"& c #696872", -"* c #63747C", -"= c #9B4E61", -"- c #8A5662", -"; c #A84D63", -": c #A55367", -"> c #AA5167", -", c #A55569", -"< c #AB5368", -"1 c #A45A6C", -"2 c #AA5A6D", -"3 c #AC5E71", -"4 c #81656C", -"5 c #8F6F77", -"6 c #906D76", -"7 c #8F7078", -"8 c #94767D", -"9 c #9B727C", -"0 c #AE6375", -"q c #B3687A", -"w c #547B85", -"e c #5E7B82", -"r c #5E7D8C", -"t c #657981", -"y c #6C7F87", -"u c #6C7F88", -"i c #7B7486", -"p c #707388", -"a c #887A83", -"s c #9E7F87", -"d c #3E8B9E", -"f c #3B92A7", -"g c #3696AD", -"h c #3F98AE", -"j c #5E8088", -"k c #548797", -"l c #558698", -"z c #598B9C", -"x c #60858E", -"c c #6E848B", -"v c #73868E", -"b c #7A828D", -"n c #6C8391", -"m c #6A8F97", -"M c #7D8792", -"N c #758C94", -"B c #7B8D95", -"V c #748F9B", -"C c #7A8E9A", -"Z c #6D919A", -"A c #7A9097", -"S c #72939B", -"D c #7C949B", -"F c #7E989E", -"G c #548FA3", -"H c #4399AE", -"J c #4C9AAD", -"K c #5293A5", -"L c #5C95A5", -"P c #5597A9", -"I c #5499AA", -"U c #5B9BAB", -"Y c #459EB3", -"T c #5A9EB0", -"R c #6597A2", -"E c #6994A5", -"W c #6D9AA5", -"Q c #659CAB", -"! c #6C9CAB", -"~ c #7296A5", -"^ c #7499A3", -"/ c #7A9CA5", -"( c #779BA9", -") c #45A0B7", -"_ c #4BA1B6", -"` c #47A2B8", -"' c #4AA3B9", -"] c #4FA8BE", -"[ c #56A1B4", -"{ c #5CA1B3", -"} c #52A6BA", -"| c #5CA6B8", -" . c #54A8BC", -".. c #5CA9BC", -"X. c #68A0AF", -"o. c #7DA1A9", -"O. c #63A1B3", -"+. c #6EA7B7", -"@. c #62A7B9", -"#. c #63ABBD", -"$. c #6BADBE", -"%. c #74A2B0", -"&. c #78A7B3", -"*. c #70AEBE", -"=. c #5AAEC2", -"-. c #67B5C8", -";. c #74B1C0", -":. c #7EB5C2", -">. c #7FBCCB", -",. c #9F888D", -"<. c #828C96", -"1. c #928A92", -"2. c #9C8990", -"3. c #82959D", -"4. c #8A959F", -"5. c #81989F", -"6. c #A2848B", -"7. c #A2888E", -"8. c #AE8E96", -"9. c #A99297", -"0. c #AD9399", -"q. c #B2999F", -"w. c #8497A0", -"e. c #8E96A1", -"r. c #829CA2", -"t. c #8A9DA5", -"y. c #8C9FA8", -"u. c #9097A2", -"i. c #9B9EA8", -"p. c #B59EA4", -"a. c #8AA0A7", -"s. c #83A4AC", -"d. c #8DA2AA", -"f. c #91A4AC", -"g. c #98A0AA", -"h. c #91A8AF", -"j. c #80A7B6", -"k. c #87A9B1", -"l. c #8CAAB2", -"z. c #94ACB3", -"x. c #9AACB4", -"c. c #87B2BD", -"v. c #95B1B7", -"b. c #98B1B7", -"n. c #94B2B9", -"m. c #98B2B8", -"M. c #9FB8BF", -"N. c #A0B5BC", -"B. c #A1B9BF", -"V. c #BCB1B8", -"C. c #CAB3B9", -"Z. c #8FBAC5", -"A. c #93BCC7", -"S. c #9EBAC1", -"D. c #A3BDC3", -"F. c #A8BEC5", -"G. c #9DC0C9", -"H. c #83C2D1", -"J. c #A7C0C6", -"K. c #A8C1C7", -"L. c #A4C3CA", -"P. c #AEC7CD", -"I. c #A5CFDB", -"U. c #B6CDD4", -"Y. c #B9D1D7", -"T. c #BAD5DB", -"R. c #BFD9DF", -"E. c #B0D8E2", -"W. c #BEDFE7", -"Q. c #C2C1C9", -"!. c #DBC4CA", -"~. c #DDC8CE", -"^. c #E0C9CF", -"/. c #C3DDE3", -"(. c #C7E0E7", -"). c #CEE7ED", -"_. c None", -/* pixels */ -"3 3 3 3 3 3 3 3 3 ; : = = = = = = = = < 3 2 2 2 2 2 2 2 ; , , , , , , , , : _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 7.,.7.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . % s p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.,.# . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.D 1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % s p.p.p.p.p.p.p.q.8 ,.,.,.7.1.L U I i _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % ,.p.p.p.p.p.p.p.p.8 ,.,.S P U F r.r.K _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . % 6.p.p.p.p.p.p.p.p.a L P W o.5.5.r.r.U _._._._._._._._._._.", -"< s s s s s s s s 9 6 8 5 5 5 7 5 5 5 6 7 5 5 5 7 7 n I K ^ r.r.F a.a.F a.F H _._._._._._._._._.", -"q !.!.!.!.!.!.!.!.6.9.p.q.p.p.p.q.p.6.4 # . . $ k I &.m.A 3.r.r.a.F r.r.F r.J _._._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.9.p.p.p.p.p.p.p.7.4 . * K T v.b.b.b.h.t.r.r.r.r.r.r./ r.o.f _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.0.p.p.p.p.p.p.p.,.k K %.m.m.m.m.b.m.b.a.F r.r.r.r.r.r.r.r.H _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.q.p.p.p.p.p.g.O.{ S A m.m.m.m.m.m.m.b.d.w.r.r.r.r.r.r.r.r.R _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.7.8.p.p.p.%.{ X.r.r.r.v z.m.m.m.b.m.m.b.b.t.5.r.r.r.5./ B Z ^ ` _._._._._._._.", -"q ^.^.^.^.^.^.^.^.7.8.i.O.O.( r.r.r.r.r.N F b.m.m.m.m.m.b.b.d.r.r.r.5.5.t.4.v.P.;._._._._._._._.", -"q ^.^.^.^.^.~.~.~.E T X.a.5.a.F r.r.r.r.5.v b.b.m.b.m.m.m.b.v.5.3.5.d.h.D.P.P.P.P._ _._._._._._.", -"q ^.^.^.^.^.Q.*.$.A.P.r.F / F a.r.r.r.r.r.N a.b.m.m.m.m.m.z.d.f.f.x.P.P.P.P.P.P.P.#._._._._._._.", -"< 8.0.0.^ [ *.P.P.P.P.a.5.a.r.r./ r.r.r.r.5.B b.m.m.b.a.3.3.5.5.5.P.P.P.P.P.P.P.P.L.' _._._._._.", -"0 q.( @.Z.P.P.P.P.P.P.J.D F r.r.r.r.r.r.r.r.w.h.z.r.w.r.5.r.r.r.5.h.P.P.P.P.P.P.P.P..._._._._._.", -"0 C.x.:.P.P.P.P.P.P.P.P.t.5.r.r.r.r.r.r.r.r.t.d.d.d.r.r.r.r.r.r.a.5.P.P.P.P.P.P.P.P.Z._._._._._.", -"0 C.C.@.P.P.P.P.P.P.P.P.m.4.r.r.r.r.r.5.a.d.d.d.r.r.r.r.r.r.r.r.5.5.m.P.P.P.P.P.P.P.P.} _._._._.", -"0 C.C.j.G.P.P.P.P.P.P.P.P.5.5.r.r.5.3.3.d.h.b.a.a.r.r.r.r.r.r.r.F 5.a.P.P.P.P.P.P.P.l.{ _._._._.", -"0 C.C.C.#.P.P.P.P.P.P.P.P.h.5.5.3.3.r.v.b.b.m.h.d.r.r.r.r.r.r.r.a.5.3.L.P.P.P.M.s.^ Z S H _._._.", -"0 C.C.C.+.L.P.P.P.P.P.P.m.t.<.3.d.m.n.m.m.m.b.m.d.r.r.r.r.r.r.r.r.r.5.d.P.h.o.Z S F r.r.I _._._.", -"0 C.C.C.C.$.P.P.P.P.f.3.t.m.h.5.m.m.m.b.m.m.m.m.d.d.r.r.r.r.r.r.r.r.r.3.3.b D 5.r.r.r.r./ Y _._.", -"0 C.C.C.C.@.P.D.h.3.d.P.).)./.<.v.m.m.m.m.b.m.m.b.d.w.r.r.r.r.r.5.4.5.3.A r.r.r.r.r.r.r.r.J _._.", -"2 0.0.0.0.e.Q t.m.R.).).).).).f./ m.m.m.m.m.m.m.b.r.t.5.r.r.5.D 3.f.P.m.M r.r.r./ r.r.r.r.^ H _.", -"= 4 4 4 4 4 T ).).).).).).).).U.3.b.m.m.m.m.m.b.b.z.v 5.D 5.d.M.P.P.P.P.5.D r.r.r.r.r.r.r.r.H _.", -"= . . . . . r I.).).).).).).).).h.d.m.m.b.m.m.m.z.N X * d.P.P.P.P.P.P.P.b.M r.r.r.r.r.r.r.r.R _.", -"= . . . . . . | ).).).).).).).).K.d.m.m.m.m.r.c + t N t P.P.P.P.P.P.P.P.P.<.F r.r.r.r.r.r.r.r.H ", -"= . . . . . . z (.).).).).).).).).f.h.z.A * * c 5.r.r.* f.P.P.P.P.P.P.P.P.e.S r.r.r.r.r.F S Z Y ", -"= . . . . . $.).).).).).).).).m.3.y * B r.r.r.r.r.N A P.P.P.P.P.P.P.P.K.Z a./ 5.S m S k.B...", -"= . . . . . . P ).).).).).(.F.x.f.3.D r.r.r.r.r.r.F a.v M.P.P.P.P.P.P.P.P.s.N S Z o.v.P.P.P...", -"= . . . . . . . & >.).).Y.N.h.h.m.P.d.N r.r.r.r.F a.o.5.S f.P.P.P.P.P.P.P.x./ _.s.M.P.P.P.P.P...", -"= . . . . . . . . T F.x.y.h.F.P.P.P.N.c r.r.r.r.o.F a.5.5.4.J.P.P.P.K.h.d.4.J.k.b.P.P.P.P.P.P...", -"= - - - - - - - - p ~ x.P.P.P.P.P.P.P.A N r.r.r.5.r.r.r.r.A d.P.m.g.4.z.U.).).P.o.P.P.P.P.P.P.#.", -"_._._._._._._._._._.[ P.P.P.P.P.P.P.P.m.N r.r.r.r.r.r.F r.F S D a.N.(.).).).).).o.B.P.P.P.P.P...", -"_._._._._._._._._._.Y G.P.P.P.P.P.P.P.P.S F r.r.r.r.r.D S Z ^ l.).).).).).).).).S.s.P.P.P.P.P...", -"_._._._._._._._._._._.#.P.P.P.P.P.P.P.P.l.Z r.r.5.S Z o.l.K.m.o.).).).).).).).).(./ P.P.P.P.P...", -"_._._._._._._._._._._.` K.P.P.P.P.P.P.P.P.Z A Z Z s.M.P.P.P.P./ P.).).).).).).).).n.h.P.P.P.L.' ", -"_._._._._._._._._._._._.;.P.P.P.P.P.P.P.l.W ^ k.K.P.P.P.P.P.P.l.l.).).).).).).).).T.^ P.Z...` _.", -"_._._._._._._._._._._._.` P.P.P.P.S.s.m j @ S P.P.P.P.P.P.P.P.P.^ T.).).).).).).).)..._ _._._._.", -"_._._._._._._._._._._._._.:.P.n.o.x e + o o j v.P.P.P.P.P.P.P.P.k.n.).).).).).E.-.] _._._._._._.", -"_._._._._._._._._._._._._.` Z j @ o o o o o + / P.P.P.P.P.P.P.P.J.^ /.).).H.=._ _._._._._._._._.", -"_._._._._._._._._._._._._.g w o o o o o o o o x M.P.P.P.P.P.P.P.P.s.c.-.] _._._._._._._._._._._.", -"_._._._._._._._._._._._._._.d o o o o o o o O e o.P.P.P.P.P.P.P.;.[ _._._._._._._._._._._._._._.", -"_._._._._._._._._._._._._._.f d d d d d d d d d h ............' _._._._._._._._._._._._._._._._." -}; diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/app-icon.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/app-icon.png deleted file mode 100644 index 06ebd38cb0..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/app-icon.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/diffusionimaging.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/diffusionimaging.png deleted file mode 100644 index 9582dd772d..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/diffusionimaging.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_dicom.xpm b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_dicom.xpm deleted file mode 100644 index d35e45238c..0000000000 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_dicom.xpm +++ /dev/null @@ -1,71 +0,0 @@ -/* XPM */ -static char *Dicom___[] = { -/* columns rows colors chars-per-pixel */ -"48 48 17 1", -" c #00AAD1", -". c #00A9D2", -"X c #00A8D3", -"o c #00A9D3", -"O c #00AAD2", -"+ c #00ABD2", -"@ c #00AAD3", -"# c #00ABD3", -"$ c #00ACD3", -"% c #00A9D4", -"& c #00A9D5", -"* c #00AAD4", -"= c #00ABD4", -"- c #00AAD5", -"; c #00ABD5", -": c #00ACD4", -"> c None", -/* pixels */ -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>*>>>>>>>>>>>>>>>>>>", -">o@@@@*@>>>>@o>>>>>*Oo*#>>*@%O@o>>>>@@%>>>>>@@>>", -">O@>>>@@@>>>@o>>o.@>>>>>>@O=>>*@#>>>Oo@>>>>+o@o>", -">O@>>>>>#@>>@o>>+@>>>>>>>*->>>>>@o>>@@@>>>>@@@+>", -">O@>>>>>%@>>@o>##>>>>>>>o@>>>>>>*%>>@@@.>>>@-@#>", -">O@>>>>>o@>>@o>@@>>>>>>>=@>>>>>>+@>>O@**>>:@>@@>", -">O@>>>>>@@>>@o>@@>>>>>>>o*>>>>>>#@>>OX>@>>@O>@@>", -">O@>>>>>OO>>@o>@@>>>>>>>#@>>>>>>@O>>@+>@O>@@>o*>", -">O@>>>>>==>>@o>+@>>>>>>>*.>>>>>>@@>>@@> O+@>>#@>", -">O@>>>>*@>>>@o>>@%>>>>>>>O@>>>>#@->>@>>>***>>@*>", -">O#@$=@@&>>>@o>>+@@O*=O>>=@.o #O@>>O@>>>@@>>>@@>", -">O***@->>>>>#->>>>OO@oo>>>>@O+@@>>>;@>>>oO>>>@O>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", -">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -}; diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/icon_home.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_home.png similarity index 100% rename from Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/icon_home.png rename to Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_home.png diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_vesseltreesegmentation.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_vesseltreesegmentation.png deleted file mode 100644 index 40e5728730..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/icon_vesseltreesegmentation.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/mintLogo.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/mintLogo.png deleted file mode 100644 index c88813fd52..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/mintLogo.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/org_mitk_gui_qt_diffusionimagingapp.qrc b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/org_mitk_gui_qt_diffusionimagingapp.qrc index 086feb2a7e..d41ce744a5 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/org_mitk_gui_qt_diffusionimagingapp.qrc +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/org_mitk_gui_qt_diffusionimagingapp.qrc @@ -1,6 +1,3 @@ - - - app-icon.png - mintLogo.png - - + + + diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/chart.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/chart.png deleted file mode 100644 index 322dae0037..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/chart.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/connectomics.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/connectomics.png deleted file mode 100644 index f434f12741..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/connectomics.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/dicomimport.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/dicomimport.png deleted file mode 100644 index 1bb5f7ea4a..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/dicomimport.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/diffusionimaging.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/diffusionimaging.png deleted file mode 100644 index 9582dd772d..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/diffusionimaging.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/eye.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/eye.png deleted file mode 100644 index 6e6e216171..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/eye.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing.png deleted file mode 100644 index c15f94f857..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing2.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing2.png deleted file mode 100644 index 0e1c876590..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/imageProcessing2.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData1.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData1.png deleted file mode 100644 index f5463c2150..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData1.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData2.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData2.png deleted file mode 100644 index b01d5561bd..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/phantomData2.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessing.png deleted file mode 100644 index dc91cb9c2c..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessing.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessingreconstruction.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessingreconstruction.png deleted file mode 100644 index a89e20560d..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/preprocessingreconstruction.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/quantification.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/quantification.png deleted file mode 100644 index beb711dc03..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/quantification.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.png deleted file mode 100644 index b3d11132b6..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.xpm b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.xpm deleted file mode 100644 index 51a5f9c4bb..0000000000 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/registration.xpm +++ /dev/null @@ -1,231 +0,0 @@ -/* XPM */ -static char *RigidRegistration___[] = { -/* columns rows colors chars-per-pixel */ -"48 48 177 2", -" c #6F5F67", -". c #735C62", -"X c #5B6B74", -"o c #577076", -"O c #587177", -"+ c #5C747B", -"@ c #5D797F", -"# c #796167", -"$ c #71636B", -"% c #7F656B", -"& c #696872", -"* c #63747C", -"= c #9B4E61", -"- c #8A5662", -"; c #A84D63", -": c #A55367", -"> c #AA5167", -", c #A55569", -"< c #AB5368", -"1 c #A45A6C", -"2 c #AA5A6D", -"3 c #AC5E71", -"4 c #81656C", -"5 c #8F6F77", -"6 c #906D76", -"7 c #8F7078", -"8 c #94767D", -"9 c #9B727C", -"0 c #AE6375", -"q c #B3687A", -"w c #547B85", -"e c #5E7B82", -"r c #5E7D8C", -"t c #657981", -"y c #6C7F87", -"u c #6C7F88", -"i c #7B7486", -"p c #707388", -"a c #887A83", -"s c #9E7F87", -"d c #3E8B9E", -"f c #3B92A7", -"g c #3696AD", -"h c #3F98AE", -"j c #5E8088", -"k c #548797", -"l c #558698", -"z c #598B9C", -"x c #60858E", -"c c #6E848B", -"v c #73868E", -"b c #7A828D", -"n c #6C8391", -"m c #6A8F97", -"M c #7D8792", -"N c #758C94", -"B c #7B8D95", -"V c #748F9B", -"C c #7A8E9A", -"Z c #6D919A", -"A c #7A9097", -"S c #72939B", -"D c #7C949B", -"F c #7E989E", -"G c #548FA3", -"H c #4399AE", -"J c #4C9AAD", -"K c #5293A5", -"L c #5C95A5", -"P c #5597A9", -"I c #5499AA", -"U c #5B9BAB", -"Y c #459EB3", -"T c #5A9EB0", -"R c #6597A2", -"E c #6994A5", -"W c #6D9AA5", -"Q c #659CAB", -"! c #6C9CAB", -"~ c #7296A5", -"^ c #7499A3", -"/ c #7A9CA5", -"( c #779BA9", -") c #45A0B7", -"_ c #4BA1B6", -"` c #47A2B8", -"' c #4AA3B9", -"] c #4FA8BE", -"[ c #56A1B4", -"{ c #5CA1B3", -"} c #52A6BA", -"| c #5CA6B8", -" . c #54A8BC", -".. c #5CA9BC", -"X. c #68A0AF", -"o. c #7DA1A9", -"O. c #63A1B3", -"+. c #6EA7B7", -"@. c #62A7B9", -"#. c #63ABBD", -"$. c #6BADBE", -"%. c #74A2B0", -"&. c #78A7B3", -"*. c #70AEBE", -"=. c #5AAEC2", -"-. c #67B5C8", -";. c #74B1C0", -":. c #7EB5C2", -">. c #7FBCCB", -",. c #9F888D", -"<. c #828C96", -"1. c #928A92", -"2. c #9C8990", -"3. c #82959D", -"4. c #8A959F", -"5. c #81989F", -"6. c #A2848B", -"7. c #A2888E", -"8. c #AE8E96", -"9. c #A99297", -"0. c #AD9399", -"q. c #B2999F", -"w. c #8497A0", -"e. c #8E96A1", -"r. c #829CA2", -"t. c #8A9DA5", -"y. c #8C9FA8", -"u. c #9097A2", -"i. c #9B9EA8", -"p. c #B59EA4", -"a. c #8AA0A7", -"s. c #83A4AC", -"d. c #8DA2AA", -"f. c #91A4AC", -"g. c #98A0AA", -"h. c #91A8AF", -"j. c #80A7B6", -"k. c #87A9B1", -"l. c #8CAAB2", -"z. c #94ACB3", -"x. c #9AACB4", -"c. c #87B2BD", -"v. c #95B1B7", -"b. c #98B1B7", -"n. c #94B2B9", -"m. c #98B2B8", -"M. c #9FB8BF", -"N. c #A0B5BC", -"B. c #A1B9BF", -"V. c #BCB1B8", -"C. c #CAB3B9", -"Z. c #8FBAC5", -"A. c #93BCC7", -"S. c #9EBAC1", -"D. c #A3BDC3", -"F. c #A8BEC5", -"G. c #9DC0C9", -"H. c #83C2D1", -"J. c #A7C0C6", -"K. c #A8C1C7", -"L. c #A4C3CA", -"P. c #AEC7CD", -"I. c #A5CFDB", -"U. c #B6CDD4", -"Y. c #B9D1D7", -"T. c #BAD5DB", -"R. c #BFD9DF", -"E. c #B0D8E2", -"W. c #BEDFE7", -"Q. c #C2C1C9", -"!. c #DBC4CA", -"~. c #DDC8CE", -"^. c #E0C9CF", -"/. c #C3DDE3", -"(. c #C7E0E7", -"). c #CEE7ED", -"_. c None", -/* pixels */ -"3 3 3 3 3 3 3 3 3 ; : = = = = = = = = < 3 2 2 2 2 2 2 2 ; , , , , , , , , : _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 7.,.7.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . % s p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.,.# . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.D 1 _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % s p.p.p.p.p.p.p.q.8 ,.,.,.7.1.L U I i _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s # . . . . . . . % ,.p.p.p.p.p.p.p.p.8 ,.,.S P U F r.r.K _._._._._._._._._._.", -"0 C.C.C.C.C.C.C.C.s . . . . . . . . % 6.p.p.p.p.p.p.p.p.a L P W o.5.5.r.r.U _._._._._._._._._._.", -"< s s s s s s s s 9 6 8 5 5 5 7 5 5 5 6 7 5 5 5 7 7 n I K ^ r.r.F a.a.F a.F H _._._._._._._._._.", -"q !.!.!.!.!.!.!.!.6.9.p.q.p.p.p.q.p.6.4 # . . $ k I &.m.A 3.r.r.a.F r.r.F r.J _._._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.9.p.p.p.p.p.p.p.7.4 . * K T v.b.b.b.h.t.r.r.r.r.r.r./ r.o.f _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.0.p.p.p.p.p.p.p.,.k K %.m.m.m.m.b.m.b.a.F r.r.r.r.r.r.r.r.H _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.6.q.p.p.p.p.p.g.O.{ S A m.m.m.m.m.m.m.b.d.w.r.r.r.r.r.r.r.r.R _._._._._._._._.", -"q ^.^.^.^.^.^.^.^.7.8.p.p.p.%.{ X.r.r.r.v z.m.m.m.b.m.m.b.b.t.5.r.r.r.5./ B Z ^ ` _._._._._._._.", -"q ^.^.^.^.^.^.^.^.7.8.i.O.O.( r.r.r.r.r.N F b.m.m.m.m.m.b.b.d.r.r.r.5.5.t.4.v.P.;._._._._._._._.", -"q ^.^.^.^.^.~.~.~.E T X.a.5.a.F r.r.r.r.5.v b.b.m.b.m.m.m.b.v.5.3.5.d.h.D.P.P.P.P._ _._._._._._.", -"q ^.^.^.^.^.Q.*.$.A.P.r.F / F a.r.r.r.r.r.N a.b.m.m.m.m.m.z.d.f.f.x.P.P.P.P.P.P.P.#._._._._._._.", -"< 8.0.0.^ [ *.P.P.P.P.a.5.a.r.r./ r.r.r.r.5.B b.m.m.b.a.3.3.5.5.5.P.P.P.P.P.P.P.P.L.' _._._._._.", -"0 q.( @.Z.P.P.P.P.P.P.J.D F r.r.r.r.r.r.r.r.w.h.z.r.w.r.5.r.r.r.5.h.P.P.P.P.P.P.P.P..._._._._._.", -"0 C.x.:.P.P.P.P.P.P.P.P.t.5.r.r.r.r.r.r.r.r.t.d.d.d.r.r.r.r.r.r.a.5.P.P.P.P.P.P.P.P.Z._._._._._.", -"0 C.C.@.P.P.P.P.P.P.P.P.m.4.r.r.r.r.r.5.a.d.d.d.r.r.r.r.r.r.r.r.5.5.m.P.P.P.P.P.P.P.P.} _._._._.", -"0 C.C.j.G.P.P.P.P.P.P.P.P.5.5.r.r.5.3.3.d.h.b.a.a.r.r.r.r.r.r.r.F 5.a.P.P.P.P.P.P.P.l.{ _._._._.", -"0 C.C.C.#.P.P.P.P.P.P.P.P.h.5.5.3.3.r.v.b.b.m.h.d.r.r.r.r.r.r.r.a.5.3.L.P.P.P.M.s.^ Z S H _._._.", -"0 C.C.C.+.L.P.P.P.P.P.P.m.t.<.3.d.m.n.m.m.m.b.m.d.r.r.r.r.r.r.r.r.r.5.d.P.h.o.Z S F r.r.I _._._.", -"0 C.C.C.C.$.P.P.P.P.f.3.t.m.h.5.m.m.m.b.m.m.m.m.d.d.r.r.r.r.r.r.r.r.r.3.3.b D 5.r.r.r.r./ Y _._.", -"0 C.C.C.C.@.P.D.h.3.d.P.).)./.<.v.m.m.m.m.b.m.m.b.d.w.r.r.r.r.r.5.4.5.3.A r.r.r.r.r.r.r.r.J _._.", -"2 0.0.0.0.e.Q t.m.R.).).).).).f./ m.m.m.m.m.m.m.b.r.t.5.r.r.5.D 3.f.P.m.M r.r.r./ r.r.r.r.^ H _.", -"= 4 4 4 4 4 T ).).).).).).).).U.3.b.m.m.m.m.m.b.b.z.v 5.D 5.d.M.P.P.P.P.5.D r.r.r.r.r.r.r.r.H _.", -"= . . . . . r I.).).).).).).).).h.d.m.m.b.m.m.m.z.N X * d.P.P.P.P.P.P.P.b.M r.r.r.r.r.r.r.r.R _.", -"= . . . . . . | ).).).).).).).).K.d.m.m.m.m.r.c + t N t P.P.P.P.P.P.P.P.P.<.F r.r.r.r.r.r.r.r.H ", -"= . . . . . . z (.).).).).).).).).f.h.z.A * * c 5.r.r.* f.P.P.P.P.P.P.P.P.e.S r.r.r.r.r.F S Z Y ", -"= . . . . . $.).).).).).).).).m.3.y * B r.r.r.r.r.N A P.P.P.P.P.P.P.P.K.Z a./ 5.S m S k.B...", -"= . . . . . . P ).).).).).(.F.x.f.3.D r.r.r.r.r.r.F a.v M.P.P.P.P.P.P.P.P.s.N S Z o.v.P.P.P...", -"= . . . . . . . & >.).).Y.N.h.h.m.P.d.N r.r.r.r.F a.o.5.S f.P.P.P.P.P.P.P.x./ _.s.M.P.P.P.P.P...", -"= . . . . . . . . T F.x.y.h.F.P.P.P.N.c r.r.r.r.o.F a.5.5.4.J.P.P.P.K.h.d.4.J.k.b.P.P.P.P.P.P...", -"= - - - - - - - - p ~ x.P.P.P.P.P.P.P.A N r.r.r.5.r.r.r.r.A d.P.m.g.4.z.U.).).P.o.P.P.P.P.P.P.#.", -"_._._._._._._._._._.[ P.P.P.P.P.P.P.P.m.N r.r.r.r.r.r.F r.F S D a.N.(.).).).).).o.B.P.P.P.P.P...", -"_._._._._._._._._._.Y G.P.P.P.P.P.P.P.P.S F r.r.r.r.r.D S Z ^ l.).).).).).).).).S.s.P.P.P.P.P...", -"_._._._._._._._._._._.#.P.P.P.P.P.P.P.P.l.Z r.r.5.S Z o.l.K.m.o.).).).).).).).).(./ P.P.P.P.P...", -"_._._._._._._._._._._.` K.P.P.P.P.P.P.P.P.Z A Z Z s.M.P.P.P.P./ P.).).).).).).).).n.h.P.P.P.L.' ", -"_._._._._._._._._._._._.;.P.P.P.P.P.P.P.l.W ^ k.K.P.P.P.P.P.P.l.l.).).).).).).).).T.^ P.Z...` _.", -"_._._._._._._._._._._._.` P.P.P.P.S.s.m j @ S P.P.P.P.P.P.P.P.P.^ T.).).).).).).).)..._ _._._._.", -"_._._._._._._._._._._._._.:.P.n.o.x e + o o j v.P.P.P.P.P.P.P.P.k.n.).).).).).E.-.] _._._._._._.", -"_._._._._._._._._._._._._.` Z j @ o o o o o + / P.P.P.P.P.P.P.P.J.^ /.).).H.=._ _._._._._._._._.", -"_._._._._._._._._._._._._.g w o o o o o o o o x M.P.P.P.P.P.P.P.P.s.c.-.] _._._._._._._._._._._.", -"_._._._._._._._._._._._._._.d o o o o o o o O e o.P.P.P.P.P.P.P.;.[ _._._._._._._._._._._._._._.", -"_._._._._._._._._._._._._._.f d d d d d d d d d h ............' _._._._._._._._._._._._._._._._." -}; diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/tbss.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/tbss.png deleted file mode 100644 index 61f1eef09e..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/tbss.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utilities.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utilities.png deleted file mode 100644 index 0717ebaf45..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utilities.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utility.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utility.png deleted file mode 100644 index 2470fbd7de..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/perspectives/utility.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/preprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/preprocessing.png deleted file mode 100644 index d7564ca333..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/preprocessing.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/segmentation.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/segmentation.png deleted file mode 100644 index a3f7bd9f27..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/segmentation.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/volvis.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/volvis.png deleted file mode 100644 index b560f32dbd..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/volvis.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/QmitkWelcomeScreenView.qrc b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/QmitkWelcomeScreenView.qrc index 79affa1245..65bb011704 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/QmitkWelcomeScreenView.qrc +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/QmitkWelcomeScreenView.qrc @@ -1,36 +1,36 @@ style.css function.js pics/background.jpg pics/popup_bttn_close.png pics/experimental.png pics/button_mitka.png pics/button_mitk.png mitkdiffusionimagingappwelcomeview.html pics/01adicomimport.png pics/01dicomimport.png pics/02apreprocessingreconstruction.png pics/02preprocessingreconstruction.png pics/03aquantification.png pics/03quantification.png pics/04atractography.png pics/04tractography.png - pics/05atbss.png - pics/05tbss.png pics/06aconnectomics.png pics/06connectomics.png pics/07aivim.png pics/07ivim.png pics/08avolumevisualization.png pics/08volumevisualization.png pics/11asegmentation.png pics/11segmentation.png pics/12aregistration.png pics/12registration.png pics/13autilities.png pics/13utilities.png pics/10softwarephantoms.png pics/10asoftwarephantoms.png + pics/05afiberprocessing.png + pics/05fiberprocessing.png diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/function.js b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/function.js index 06fad44eb8..c601d7f0a6 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/function.js +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/function.js @@ -1,317 +1,320 @@ // If you want to create a new button you have to add some data (strings) to the following five arrays. // Make sure that you add your data at the same position in each array. // The buttons will be generated in order to the array's index. e.g. data at array's index '0' will generate the first button. // enter the name of your module here -var moduleNames = new Array("Preprocessing and Reconstruction", +var moduleNames = new Array( + "Preprocessing", + "ODF Reconstruction/Signal Modelling", + "Diffusion Indices", "Tractography", + "Fiber Processing", "Connectomics", "Fiberfox", -// "Registration", "IVIM", - "Image Processing", - "Visualization", - "Utilities", + "Segmentation", "MITK Downloads & News"); // add the MITK-link to your module -var moduleLinks = new Array("mitk://mitk.perspectives/org.mitk.perspectives.reconstruction1?clear=false", +var moduleLinks = new Array( + "mitk://mitk.perspectives/org.mitk.perspectives.dwipreprocessing?clear=false", + "mitk://mitk.perspectives/org.mitk.perspectives.reconstruction1?clear=false", + "mitk://mitk.perspectives/org.mitk.perspectives.quantification?clear=false", "mitk://mitk.perspectives/org.mitk.perspectives.tractography2?clear=false", + "mitk://mitk.perspectives/org.mitk.perspectives.fiberprocessings?clear=false", "mitk://mitk.perspectives/org.mitk.perspectives.connectomics?clear=false", "mitk://mitk.perspectives/org.mitk.perspectives.syntheticdata?clear=false", "mitk://mitk.perspectives/org.mitk.perspectives.ivim?clear=false", - "", - "", - "", -// "", -// "", + "mitk://mitk.perspectives/org.mitk.perspectives.segmentation?clear=false", "http://www.mitk.org"); // add the filename of your icon for the module. Place the picture in subdirectory "pics". // The picture's width should be 136 pixel; the height 123 pixel. -var picFilenames = new Array("02preprocessingreconstruction.png", -// "03quantification.png", +var picFilenames = new Array( + "12registration.png", + "02preprocessingreconstruction.png", + "03quantification.png", "04tractography.png", + "05fiberprocessing.png", "06connectomics.png", "10softwarephantoms.png", -// "12registration.png", "07ivim.png", "11segmentation.png", - "08volumevisualization.png", - "13utilities.png", "button_mitk.png"); // if you want to create an animated icon, add the name of your animated gif (placed in subdirectory "pics"). Otherwise enter an empty string "". // The animation's width should be 136 pixel; the height 123 pixel. -var aniFilenames = new Array("02apreprocessingreconstruction.png", -// "03aquantification.png", +var aniFilenames = new Array( + "12aregistration.png", + "02apreprocessingreconstruction.png", + "03aquantification.png", "04atractography.png", + "05afiberprocessing.png", "06aconnectomics.png", "10asoftwarephantoms.png", -// "12aregistration.png", "07aivim.png", "11asegmentation.png", - "08avolumevisualization.png", - "13autilities.png", "button_mitka.png"); // if your module is not stable, you can mark it as experimental. // just set true for experimental or false for stable. -var experimental = new Array(false, +var experimental = new Array( + false, + false, false, false, false, false, false, false, -// false, -// false, false, false); +//"MITK Diffusion allows partial volume analysis and the evaluation and exploration of Tract Based Spatial Statistic datasets (it does NOT reimplement the TBSS methods available in FSL). The Partial Volume Analysis view provides a very robust method for semi-automatic ROI analysis. It uses EM clustering to probabilistically segment fiber vs. non-fiber vs. partial volume.", + // add the description for your module. The description is displayed in a PopUp-window. -var moduleDescriptions = new Array("You can use MITK Diffusion to preprocess diffusion weighted MR Images using techniques like gradient averaging or reduction and baseline image extraction. Then you can estimate diffusion tensors or q-balls using different reconstruction methods and calculates scalar indices (FA, GFA, ...).", -// "MITK Diffusion allows partial volume analysis and the evaluation and exploration of Tract Based Spatial Statistic datasets (it does NOT reimplement the TBSS methods available in FSL). The Partial Volume Analysis view provides a very robust method for semi-automatic ROI analysis. It uses EM clustering to probabilistically segment fiber vs. non-fiber vs. partial volume.", - "The tractography components of MITK Diffusion implement several fiber tractography algorithms (global and streamline; tensor, dODF/fODF/FOD, peak based as well as machine learning based using the raw signal). The fiber bundle operations view enables fiber postprocessing in various ways. The fiber quantification view generates a variety of images from given fiber tracts, extracts the principal fiber directions and gives detailed information about the fiberbundle itself.", - "Connectomics aims at building graphs (nodes and edges) from a tractogram and applying graph theory for data analysis.", - "The Fiberfox software phantom tool allows you to create synthetic diffusion-weighted MR images easily and with a wide variety of properties and options.", -// "Registration views allow for rigid and point based image registration (only non-diffusion!).", - "You can use Intravoxel Incoherent Motion to estimate tissue perfusion on basis of diffusion measurements. Several models and interactive exploration of the data are supported.", - "MITK Diffusion provides tools for image segmentation and diffusion unrelated image processing.", - "In order to visually present your research MITK Diffusion contains fast volume rendering of images, means to capture high resolution screenshots as well as movies of the 3D sceen.", - "Further utilites include the property list view to modify the properties of the selected data node as well as a logging view for debugging purposes.", - "Open the MITK website in an external browser."); +var moduleDescriptions = new Array( + "You can use MITK Diffusion to preprocess diffusion-weighted images using image registration, head-motion correction, denoising and much more.", + "MITK provides methods to estimate diffusion tensors or Q-balls using different reconstruction methods.", + "MITK allows the calculation of different scalar measures for raw diffusion-weighted images (MD, ADC), tensors (Fractional Anisotropy, Relative Anisotropy, Axial Diffusivity, Radial Diffusivity) or ODFs (Generalized Fractional Anisotropy).", + "The tractography components of MITK Diffusion implement several fiber tractography algorithms (global and streamline; tensor, dODF/fODF/FOD, peak based as well as machine learning based using the raw signal). The fiber bundle operations view enables fiber postprocessing in various ways. The fiber quantification view generates a variety of images from given fiber tracts, extracts the principal fiber directions and gives detailed information about the fiberbundle itself.", + "The results obtained with any fiber tractography method can be postprocessed using tract dissection, filtering, clustering, coloring or SIFT2-like fitting methods.", + "Connectomics aims at building graphs (nodes and edges) from a tractogram and applying graph theory for data analysis.", + "The Fiberfox software phantom tool allows you to create synthetic diffusion-weighted MR images easily and with a wide variety of properties and options.", + "You can use Intravoxel Incoherent Motion to estimate tissue perfusion on basis of diffusion measurements. Several models and interactive exploration of the data are supported.", + "MITK Diffusion provides tools for image segmentation and diffusion unrelated image processing.", + "Open the MITK website in an external browser."); var bttns = new Array(); var d = document, da = d.all; // holds id of current mouseover-HTML-element var currentTarget; // get the id of current mouseover-HTML-element d.onmouseover = function(o){ var e = da ? event.srcElement : o.target; currentTarget = e.id; } // build-function called by onload-event in HTML-document function createButtons(){ for (i=0; i < moduleNames.length; i++){ bttns[i] = new Button(moduleNames[i],moduleLinks[i], picFilenames[i], aniFilenames[i],moduleDescriptions[i]); bttns[i].createButton(); } for (i=0; i < moduleNames.length; i++){ if(experimental[i]){ setExperimental(i); } } createClearFloat(); } // Class Button function Button(moduleName, moduleLink, picFilename, aniFilename, moduleDescr){ // Properties this.bttnID = "bttn" + moduleName; this.modName = moduleName; this.modLink = moduleLink; this.picPath = "pics/" + picFilename; this.aniPath = "pics/" + aniFilename; this.modDescr = moduleDescr; // Methods this.createButton = function(){ // get DIV-wrapper for Button and append it to HTML-document bttnWrapper = this.createWrapper(); document.getElementById("bttnField").appendChild(bttnWrapper); // get link-element for picture and append it to DIV-wrapper bttnPicLink = this.createPicLink(); bttnWrapper.appendChild(bttnPicLink); // set HTML attributes for button-element bttn = document.createElement("img"); bttn.src = this.picPath; bttn.id = this.bttnID; bttn.className = "modBttn"; bttn.height = 123; bttn.width = 136; bttn.onmouseover = function(){startAni(this.id);}; bttn.onmouseout = function(){stopAni(this.id);}; // append button to link-element bttnPicLink.appendChild(bttn); // // create text-link and add it to DIV-wrapper // bttnTxtLink = document.createElement("a"); //// bttnTxtLink.href = this.modLink; // bttnTxtLink.className = "txtLink"; // bttnTxtLink.appendChild(document.createTextNode(this.modName)); // bttnTxtLink.onclick = function(){showPopUpWindow();}; // bttnTxtLink.id = "popup" + this.modName; // bttnWrapper.appendChild(bttnTxtLink); // create pop-up link for module description bttnPopUpLink = document.createElement("a"); modName = this.modName; modDescr = this.modDescr; bttnPopUpLink.onclick = function(){showPopUpWindow();}; bttnPopUpLink.className = "popUpLink"; bttnPopUpLink.id = "popup" + this.modName; bttnPopUpLink.appendChild(document.createTextNode(this.modName)); bttnWrapper.appendChild(bttnPopUpLink); return bttn; } this.createWrapper = function(){ bttnWrapper = document.createElement("div"); bttnWrapper.id = "wrapper" + this.modName; bttnWrapper.className = "bttnWrap"; return bttnWrapper; } this.createPicLink = function(){ picLink = document.createElement("a"); picLink.href = this.modLink; picLink.id = "link" + this.modName; return picLink; } } function showPopUpWindow(){ // modules position in array? modulePos = getPos(currentTarget,"popup"); // get reference to anchor-element in HTML-document popUpAnchor = document.getElementById("popupAnchor"); // check if a popUp is open if(popUpAnchor.hasChildNodes()){ // if a popUp is open, remove it! popUpAnchor.removeChild(document.getElementById("popup")); } // create new container for popUp container = document.createElement("div"); container.id = "popup"; container.align = "right"; // append popUp-container to HTML-document popUpAnchor.appendChild(container); // create close-button and append it to popUp-container bttnClose = document.createElement("img"); bttnClose.src = "pics/popup_bttn_close.png"; bttnClose.id = "bttnClose"; bttnClose.onclick = function(){closeInfoWindow();}; container.appendChild(bttnClose); // create container for content-elements contHeadline = document.createElement("div"); contHeadline.id = "contHeadline"; contDescription = document.createElement("div"); contDescription.id = "contDescription"; contModLink = document.createElement("div"); contModLink.id = "contModLink"; // append content-container to popUp-container container.appendChild(contHeadline); container.appendChild(contDescription); container.appendChild(contModLink); // create text-elements with content headline = document.createTextNode(moduleNames[modulePos] + " "); description = document.createTextNode(moduleDescriptions[modulePos]); moduleLink = document.createElement("a"); moduleLink.href = moduleLinks[modulePos] ; moduleLink.className = 'moduleLink'; moduleLinkTxt = document.createTextNode("Click here to open '" + moduleNames[modulePos].toLowerCase() + "'"); moduleLink.appendChild(moduleLinkTxt); // append text-elements to their container contHeadline.appendChild(headline); contDescription.appendChild(description); // contModLink.appendChild(moduleLink); } function getPos(id,prefix){ if(prefix == "popup"){ targetID = id.slice(5); }else{ if(prefix == "bttn"){ targetID = id.slice(4); } } for(i=0; i < moduleNames.length; i++ ){ if(moduleNames[i] == targetID){ return i; } } } function setExperimental(modPos){ linkID = "link" + moduleNames[modPos]; expPic = document.createElement("img"); expPic.src = "pics/experimental.png"; expPic.className = "expPic"; //alert(bttns[modPos].bttnID); expPic.onmouseover = function(){startAni(bttns[modPos].bttnID);changeToHover(bttns[modPos].bttnID);}; expPic.onmouseout = function(){stopAni(bttns[modPos].bttnID);changeToNormal(bttns[modPos].bttnID);}; document.getElementById(linkID).appendChild(expPic); } function changeToHover(targetId){ bttn = document.getElementById(targetId); bttn.className = "modBttnHover"; } function changeToNormal(targetId){ bttn = document.getElementById(targetId); bttn.className = "modBttn"; } // function to close PopUp-window function closeInfoWindow(){ popUpAnchor = document.getElementById("popupAnchor"); popUpAnchor.removeChild(document.getElementById("popup")); } function createClearFloat(){ cf = document.createElement("div"); cf.className = "clearfloat"; document.getElementById("bttnField").appendChild(cf); } startAni = function(targetId){ modulePos = getPos(targetId,"bttn"); if(aniFilenames[modulePos] != ''){ bttn = document.getElementById(targetId); bttn.src = "pics/" + aniFilenames[modulePos]; } } stopAni = function(targetId){ modulePos = getPos(targetId,"bttn"); bttn = document.getElementById(targetId); bttn.src = "pics/" + picFilenames[modulePos]; } diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/mitkdiffusionimagingappwelcomeview.html b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/mitkdiffusionimagingappwelcomeview.html index 285410692b..5bf2460712 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/mitkdiffusionimagingappwelcomeview.html +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/mitkdiffusionimagingappwelcomeview.html @@ -1,44 +1,42 @@ MITK Diffusion Imaging App
-

Welcome to MITK Diffusion (beta release)!

+

Welcome to MITK Diffusion!

MITK Diffusion is the diffusion-weighted MR image processing application developed at the German Cancer Research Center (DKFZ). The software is developed on the basis of the well established, free open source software toolkit MITK. It is designed to perform tasks like ODF reconstruction, fiber tractography, MR image simulation, quantification and other image processing tasks.
- This is a beta release based on the current master branch of MITK that features cutting edge developments and has not been tested extensively! The next stable release of this application will be based on the next stable release of MITK. Many but not all modules available in MITK are included in this beta release. If you are missing a feature we recommend to build MITK Diffusion from source. -
To get started, select one of the perspectives in the toolbar above. If you hover over an icon the tooltip will tell you what tools and algorithms are provided in the respective perspective. If you want to brows all available views (tabs that provide a certain functionality), click on the "View Navigator" icon in the toolbar. If you need more information about a view, open it, select it with your mouse and press "F1". For even more information, please also visit our website mitk.org or have a look at the help perspective.
If you encounter any bugs, please report them in our bugtracking system or use the MITK-users mailing list. We are grateful for any feedback!
-

Features:

+

Features:
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03aquantification.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03aquantification.png index 5903175c5b..c617cd5a16 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03aquantification.png and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03aquantification.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03quantification.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03quantification.png index 2b8d5c5210..174746082a 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03quantification.png and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/03quantification.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04atractography.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04atractography.png index 7bd6ae8059..93d07f2f1d 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04atractography.png and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04atractography.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04tractography.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04tractography.png index 42ac4c6730..f9a7c44521 100644 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04tractography.png and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/04tractography.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05afiberprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05afiberprocessing.png new file mode 100644 index 0000000000..dc7c89eb34 Binary files /dev/null and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05afiberprocessing.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05atbss.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05atbss.png deleted file mode 100644 index 4b6a461936..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05atbss.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05fiberprocessing.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05fiberprocessing.png new file mode 100644 index 0000000000..101bae308a Binary files /dev/null and b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05fiberprocessing.png differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05tbss.png b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05tbss.png deleted file mode 100644 index aeb61c6ab8..0000000000 Binary files a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/pics/05tbss.png and /dev/null differ diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/style.css b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/style.css index edc5605bb4..0daa5f9165 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/style.css +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/resources/welcome/style.css @@ -1,174 +1,193 @@ @charset "utf-8"; body{ - margin:0px 0px; - padding: 0px 0px; + margin:0px 0px; + padding: 0px 0px; } h1{ - margin:0px 0px; - padding: 0px 0px; - font-family:"Times New Roman", Times, serif; - color:#333; + margin:0px 0px; + padding: 0px 0px; + font-family:"Fira Sans", sans-serif; + color:#adb1b6; } img{border:none;} +/* unvisited link */ +a:link { + color: #adb1b6; +} + +/* visited link */ +a:visited { + color: #adb1b6; +} + +/* mouse over link */ +a:hover { + color: #adb1b6; +} + +/* selected link */ +a:active { + color: #adb1b6; +} + #screen{ - width:100%; - min-height:1060px; - height:100%; - padding-top:15px; - background-color:#888888; - background-image:url(pics/background.jpg); - background-repeat:repeat-x; + width:100%; + min-height:1060px; + height:100%; + padding-top:15px; + background-color:#1F1F1F; + background-repeat:repeat-x; } #welcome{ - min-width:150px; - max-width:690px; - margin: 0 auto; - padding-left:5px; - font-family:"Times New Roman", Times, serif; - color:#333; + min-width:150px; + max-width:690px; + margin: 0 auto; + padding-left:5px; + font-family:"Fira Sans", sans-serif; + color:#adb1b6; } #welcomeText{ - margin-top:15px; - margin-bottom:15px; - z-index:1; + margin-top:15px; + margin-bottom:15px; + z-index:1; } #bttnField{ - min-width:150px; - max-width:690px; - margin: 0 auto; - padding-left:5px; + min-width:150px; + max-width:690px; + margin: 0 auto; + padding-left:5px; } .bttnWrap{ - position:relative; - float:left; - width:140px; - height:190px; - margin-right:32px; - margin-top:5px; - z-index:2; + position:relative; + float:left; + width:140px; + height:190px; + margin-right:32px; + margin-top:5px; + z-index:2; } .modBttn{ - margin-bottom:8px; - border: solid 2px #000; + margin-bottom:8px; + border: solid 2px #000; -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.6); } .modBttn:hover{ - border: solid 2px #FFF; - cursor:pointer; + border: solid 2px #FFF; + cursor:pointer; -webkit-box-shadow: none; } .modBttnHover{ - margin-bottom:8px; - border: solid 2px #FFF; - cursor:pointer; + margin-bottom:8px; + border: solid 2px #FFF; + cursor:pointer; -webkit-box-shadow: none; } .txtLink{ - font-family:"Times New Roman", Times, serif; - font-size:16px; - font-weight:bold; - text-decoration:none; - cursor:pointer; - color:#333; + font-family:"Fira Sans", sans-serif; + font-size:16px; + font-weight:bold; + text-decoration:none; + cursor:pointer; + color:#adb1b6; } .txtLink:hover{ - text-decoration:underline; + text-decoration:underline; } .popUpLink{ - font-family:"Times New Roman", Times, serif; - font-size:14px; - font-weight:normal; - line-height:16px; - color:#333; + font-family:"Fira Sans", sans-serif; + font-size:14px; + font-weight:normal; + line-height:16px; + color:#adb1b6; } .popUpLink:hover{ - text-decoration:underline; - cursor:pointer; + text-decoration:underline; + cursor:pointer; } #popup{ - position:fixed; - max-width:690px; - min-width:150px; - background-color:#000000; - opacity: 0.8; - -webkit-border-radius: 1em; - z-index:3; - font-family:Arial, Helvetica, sans-serif; - color:#FFF; + position:fixed; + max-width:690px; + min-width:150px; + background-color:#000000; + opacity: 0.8; + -webkit-border-radius: 1em; + z-index:3; + font-family:Arial, Helvetica, sans-serif; + color:#FFF; } #bttnClose{ - position:relative; - right:10px; - top:10px; - cursor:pointer; + position:relative; + right:10px; + top:10px; + cursor:pointer; } #contHeadline{ - max-width:690px; - min-width:150px; - margin-left:10px; - margin-right:10px; - font-weight:bold; - font-size:14px; - text-align:left; + max-width:690px; + min-width:150px; + margin-left:10px; + margin-right:10px; + font-weight:bold; + font-size:14px; + text-align:left; } #contDescription{ - max-width:690px; - min-width:150px; - margin-top:15px; - margin-bottom:15px; - margin-left:10px; - margin-right:10px; - line-height:21px; - font-family:Arial, Helvetica, sans-serif; - font-weight:normal; - font-size:14px; - text-align:left; + max-width:690px; + min-width:150px; + margin-top:15px; + margin-bottom:15px; + margin-left:10px; + margin-right:10px; + line-height:21px; + font-family:Arial, Helvetica, sans-serif; + font-weight:normal; + font-size:14px; + text-align:left; } #contModLink{ - max-width:690px; - min-width:150px; - height:50px; - margin-left:10px; - margin-right:10px; - text-align:left; + max-width:690px; + min-width:150px; + height:50px; + margin-left:10px; + margin-right:10px; + text-align:left; } .moduleLink{ - font-family:Arial, Helvetica, sans-serif; - color:#FFF; + font-family:Arial, Helvetica, sans-serif; + color:#FFF; } .expPic{ - margin-top:-126px; + margin-top:-126px; } .clearfloat{clear:both;}