From: dsarrut Date: Thu, 31 Mar 2011 07:54:28 +0000 (+0000) Subject: Remove test file X-Git-Tag: v1.2.0~86 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4083a4a5c57fe553c8a5c2d43d00ffdb3e93a19b;p=clitk.git Remove test file --- diff --git a/segmentation/clitkTestFilter.cxx b/segmentation/clitkTestFilter.cxx deleted file mode 100644 index 37c6d91..0000000 --- a/segmentation/clitkTestFilter.cxx +++ /dev/null @@ -1,228 +0,0 @@ - -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ - -// clitk -#include "clitkTestFilter_ggo.h" -#include "clitkImageCommon.h" -#include "clitkBooleanOperatorLabelImageFilter.h" -#include "clitkAutoCropFilter.h" -//#include "clitkRelativePositionConstraintLabelImageFilter.h" -#include "clitkResampleImageWithOptionsFilter.h" -#include "clitkAddRelativePositionConstraintToLabelImageFilter.h" - -#include "clitkExtractLungFilter.h" -#include "clitkExtractPatientFilter.h" -#include "clitkExtractMediastinumFilter.h" - -#include "clitkTestStation7.h" - -// ITK ENST -#include "RelativePositionPropImageFilter.h" - -//-------------------------------------------------------------------- -int main(int argc, char * argv[]) { - - // Init command line - GGO(clitkTestFilter, args_info); - - // Image types - //typedef unsigned char PixelType; - typedef short PixelType; - static const int Dim=3; - typedef itk::Image InputImageType; - - // Read inputs - InputImageType::Pointer input1; - InputImageType::Pointer input2; - InputImageType::Pointer input3; - if (args_info.input1_given) input1 = clitk::readImage(args_info.input1_arg, true); - if (args_info.input2_given) input2 = clitk::readImage(args_info.input2_arg, true); - if (args_info.input3_given) input3 = clitk::readImage(args_info.input3_arg, true); - - // Declare output - InputImageType::Pointer output; - - //-------------------------------------------------------------------- - // Filter test BooleanOperatorLabelImageFilter - if (0) { - typedef clitk::BooleanOperatorLabelImageFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput1(input1); - filter->SetInput2(input2); - output = clitk::NewImageLike(input1); - filter->GraftOutput(output); /// TO VERIFY !!! - filter->Update(); - filter->SetInput2(input3); - filter->Update(); - output = filter->GetOutput(); - clitk::writeImage(output, args_info.output_arg); - } - - //-------------------------------------------------------------------- - // Filter test AutoCropLabelImageFilter - if (0) { - typedef clitk::AutoCropFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input1); - filter->Update(); - output = filter->GetOutput(); - clitk::writeImage(output, args_info.output_arg); - } - - //-------------------------------------------------------------------- - // Filter test RelativePositionPropImageFilter - if (0) { - typedef itk::Image OutputImageType; - OutputImageType::Pointer outputf; - typedef itk::RelativePositionPropImageFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input1); - - filter->SetAlpha1(clitk::deg2rad(args_info.angle1_arg)); // xy plane - filter->SetAlpha2(clitk::deg2rad(args_info.angle2_arg)); - filter->SetK1(M_PI/2.0); // Opening parameter, default = pi/2 - filter->SetFast(true); - filter->SetRadius(2); - filter->SetVerboseProgress(true); - - /* A1 A2 - Left 0 0 - Right 180 0 - Ant 90 0 - Post -90 0 - Inf 0 90 - Sup 0 -90 - */ - - filter->Update(); - clitk::writeImage(filter->GetOutput(), args_info.output_arg); - } - - //-------------------------------------------------------------------- - // Filter test - if (0) { - typedef itk::Image OutputImageType; - typedef clitk::ResampleImageWithOptionsFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input1); - filter->SetOutputIsoSpacing(1); - //filter->SetNumberOfThreads(4); // auto - filter->SetGaussianFilteringEnabled(false); - filter->Update(); - clitk::writeImage(filter->GetOutput(), args_info.output_arg); - } - - //-------------------------------------------------------------------- - // Filter AddRelativePositionConstraintToLabelImageFilter test - if (0) { - /* - typedef clitk::AddRelativePositionConstraintToLabelImageFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input1); - filter->SetInputObject(input2); - filter->SetOrientationType(FilterType::LeftTo); - filter->SetIntermediateSpacing(5); - filter->SetFuzzyThreshold(0.5); - filter->VerboseStepOn(); - filter->WriteStepOff(); - filter->Update(); - - filter->SetInput(filter->GetOutput()); - filter->SetInputObject(input2); - filter->SetOrientationType(FilterType::RightTo); - filter->SetIntermediateSpacing(5); - filter->SetFuzzyThreshold(0.5); - filter->Update(); - - clitk::writeImage(filter->GetOutput(), args_info.output_arg); - */ - } - - //-------------------------------------------------------------------- - // Filter test ExtractPatientFilter - if (0) { - /* - typedef itk::Image OutputImageType; - typedef clitk::ExtractPatientFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInput(input1); - filter->VerboseStepOn(); - filter->WriteStepOn(); - // options (default) - filter->SetUpperThreshold(-300); - filter->FinalOpenCloseOff(); // default=on (not rezally needed ?) - filter->Update(); - OutputImageType::Pointer output = filter->GetOutput(); - clitk::writeImage(output, args_info.output_arg); - */ - } - - //-------------------------------------------------------------------- - // Filter test ExtractLungsFilter - if (0) { - /* - typedef itk::Image OutputImageType; // to change into char - typedef clitk::ExtractLungFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - // DD(filter->GetNumberOfSteps()); - filter->SetInput(input1); // CT - filter->SetInputPatientMask(input2, 0); // Patient mask and BG value - filter->VerboseStepOn(); - filter->WriteStepOn(); - // options (default) - //filter->SetBackgroundValue(0); - filter->SetUpperThreshold(-300); - // filter->SetMinimumComponentSize(100); - - filter->Update(); - OutputImageType::Pointer output = filter->GetOutput(); - clitk::writeImage(output, args_info.output_arg); - */ - } - - //-------------------------------------------------------------------- - // Filter test ExtractMediastinumFilter - if (0) { - /* - typedef clitk::ExtractMediastinumFilter FilterType; - FilterType::Pointer filter = FilterType::New(); - filter->SetInputPatientLabelImage(input1); - filter->SetInputLungLabelImage(input2, 0, 1, 2); // BG, FG Left Lung, FG Right Lung - filter->SetInputBonesLabelImage(input3); - filter->VerboseStepOn(); - filter->WriteStepOn(); - filter->Update(); - output = filter->GetOutput(); - clitk::writeImage(output, args_info.output_arg); - */ - } - - //-------------------------------------------------------------------- - // Test for auto register sub-task in a segmentation process - if (1) { - ExtractLymphStation_7 * s7 = new ExtractLymphStation_7; - // s7->SetArgsInfo(args_info); - // GetParent->SetArgsInfo<> - s7->StartSegmentation(); - } - - // This is the end my friend - return EXIT_SUCCESS; -}// end main -//--------------------------------------------------------------------