diff --git a/Applications/Util/otbMultiResolutionPyramid.cxx b/Applications/Util/otbMultiResolutionPyramid.cxx
index 14102c10c66eac7d52ffb7ffb3299d223d1d02c4..a42ae7956f64c415f070b53e3dc2d9013e893429 100644
--- a/Applications/Util/otbMultiResolutionPyramid.cxx
+++ b/Applications/Util/otbMultiResolutionPyramid.cxx
@@ -115,19 +115,13 @@ private:
     FloatVectorImageType::Pointer inImage = GetParameterImage("in");
 
     // Get the Initial Output Image FileName
-    Parameter* param = GetParameterByKey("out");
     std::string path, fname, ext;
-    if (dynamic_cast<FilenameParameter*>(param))
-      {
-      FilenameParameter* paramDown =
-        dynamic_cast<FilenameParameter*>(param);
-      std::string ofname = paramDown->GetValue();
-
-      // Get the extension and the prefix of the filename
-      path  = itksys::SystemTools::GetFilenamePath(ofname);
-      fname = itksys::SystemTools::GetFilenameWithoutExtension(ofname);
-      ext   = itksys::SystemTools::GetFilenameExtension(ofname);
-      }
+    std::string ofname = GetParameterString("out");
+
+    // Get the extension and the prefix of the filename
+    path  = itksys::SystemTools::GetFilenamePath(ofname);
+    fname = itksys::SystemTools::GetFilenameWithoutExtension(ofname);
+    ext   = itksys::SystemTools::GetFilenameExtension(ofname);
 
     unsigned int currentLevel = 1;
     unsigned int currentFactor = shrinkFactor;