]> Creatis software - creaImageIO.git/commitdiff
add missing typename
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 25 May 2011 17:03:45 +0000 (17:03 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 25 May 2011 17:03:45 +0000 (17:03 +0000)
src/creaImageIOWxAnySimpleDlg.cpp
src/creaImageIOWxAnySimpleDlg.h

index b47346a3b7c9ad1fe791a6a2ef4b481f2da0c6bf..4e0bf4dd9a2ec15a42f14c72fd86e06306e1f158 100644 (file)
@@ -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<std::string> i_exts)
-               {
-                       m_exts = i_exts;
-               }
+void WxAnySimpleDlg::setExts(std::vector<std::string> i_exts)
+{
+       m_exts = i_exts;
+}
  //////////////////////////////////////////////////////////////////////
 //                                                                                                                                     //
 //////////////////////////////////////////////////////////////////////
@@ -526,11 +526,11 @@ namespace creaImageIO
          template <typename TImage> 
          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<TImage, ImageOutputType >  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<std::string>::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;
-                                       }
+                                        }
                                 }
          }
 
index 174b6cdae4c782b2f3a7c20f783f74cd9f091de2..aa829272ec719cab7039d07924f12db28245d96f 100644 (file)
@@ -50,10 +50,10 @@ namespace creaImageIO
 
                   // get an Image on wanted type
                   template <typename TImage> 
-              typename TImage::Pointer getImage(boost::any i_AnyImage)
+             typename TImage::Pointer getImage(boost::any i_AnyImage)
              {
-                     typedef itk::Image<TImage> ImageOut;
-                    ImageOut::Pointer img = ImageOut::New();
+                    typedef itk::Image<TImage> ImageOut;
+                    typename ImageOut::Pointer img = ImageOut::New();
                     img = boost::any_cast< ImageOut::Pointer>(i_AnyImage);
                     return img;
             }