From c83e33cdb98d13c0cdfafddb6f7a5b301cb63583 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Wed, 25 May 2011 17:03:45 +0000 Subject: [PATCH] add missing typename --- src/creaImageIOWxAnySimpleDlg.cpp | 37 +++++++++++++++---------------- src/creaImageIOWxAnySimpleDlg.h | 6 ++--- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/creaImageIOWxAnySimpleDlg.cpp b/src/creaImageIOWxAnySimpleDlg.cpp index b47346a..4e0bf4d 100644 --- a/src/creaImageIOWxAnySimpleDlg.cpp +++ b/src/creaImageIOWxAnySimpleDlg.cpp @@ -25,9 +25,9 @@ namespace creaImageIO ///Ctor WxAnySimpleDlg::WxAnySimpleDlg(wxWindow *parent, - wxString i_title, - const std::string i_namedescp , - const std::string i_namedb) + wxString i_title, + const std::string i_namedescp , + const std::string i_namedb) : wxDialog(parent, -1,_T("DISPLAY IMAGES"), wxDefaultPosition, wxSize(230,150)) { namedescp = i_namedescp; @@ -88,10 +88,10 @@ namespace creaImageIO - void WxAnySimpleDlg::setExts(std::vector i_exts) - { - m_exts = i_exts; - } +void WxAnySimpleDlg::setExts(std::vector i_exts) +{ + m_exts = i_exts; +} ////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////// @@ -526,11 +526,11 @@ namespace creaImageIO template void WxAnySimpleDlg::split3Din3Dvtk(TImage* i_Img) { - typedef itk::ImageToVTKImageFilter< TImage > ConnectorType; - ConnectorType::Pointer connector = ConnectorType::New(); - connector->SetInput(i_Img); - connector->GetImporter()->SetDataScalarTypeToUnsignedChar(); - connector->Update(); + typedef itk::ImageToVTKImageFilter< TImage > ConnectorType; + typename ConnectorType::Pointer connector = ConnectorType::New(); + connector->SetInput(i_Img); + connector->GetImporter()->SetDataScalarTypeToUnsignedChar(); + connector->Update(); vtkImageData *im = vtkImageData::New(); im->ShallowCopy(connector->GetOutput()); im->Update(); @@ -543,7 +543,6 @@ namespace creaImageIO { if(i_Img->GetImageDimension() == 4) { - // size of fourth dimension int dsize = i_Img->GetLargestPossibleRegion().GetSize(3); // Output Type @@ -551,7 +550,7 @@ namespace creaImageIO typedef itk::ImageSeriesWriter SeriesWriterType; typedef itk::MetaImageIO MetaImageType; MetaImageType::Pointer metaIO; - SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); + typename SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New(); // from JPR file to generate output files typedef itk::NumericSeriesFileNames NamesGeneratorType; @@ -568,7 +567,7 @@ namespace creaImageIO seriesWriter->SetInput(i_Img); seriesWriter->SetImageIO(metaIO); try - { + { seriesWriter->Update(); vtkMetaImageReader *vReader = vtkMetaImageReader::New(); std::vector::const_iterator it = names.begin(); @@ -579,13 +578,13 @@ namespace creaImageIO m_Vresults.push_back(vReader->GetOutput()); } - } - catch( itk::ExceptionObject & excp ) - { + } + catch( itk::ExceptionObject & excp ) + { std::cerr << "Exception thrown while writing the series " << std::endl; std::cerr << excp << std::endl; //return EXIT_FAILURE; - } + } } } diff --git a/src/creaImageIOWxAnySimpleDlg.h b/src/creaImageIOWxAnySimpleDlg.h index 174b6cd..aa82927 100644 --- a/src/creaImageIOWxAnySimpleDlg.h +++ b/src/creaImageIOWxAnySimpleDlg.h @@ -50,10 +50,10 @@ namespace creaImageIO // get an Image on wanted type template - typename TImage::Pointer getImage(boost::any i_AnyImage) + typename TImage::Pointer getImage(boost::any i_AnyImage) { - typedef itk::Image ImageOut; - ImageOut::Pointer img = ImageOut::New(); + typedef itk::Image ImageOut; + typename ImageOut::Pointer img = ImageOut::New(); img = boost::any_cast< ImageOut::Pointer>(i_AnyImage); return img; } -- 2.47.1