Index: /osgVisual/include/distortion/visual_distortion.h
===================================================================
--- /osgVisual/include/distortion/visual_distortion.h	(revision 149)
+++ /osgVisual/include/distortion/visual_distortion.h	(revision 150)
@@ -75,12 +75,10 @@
 	virtual ~visual_distortion(void);
 
-	bool processXMLConfiguration(); 
-
-	/**
-	 * \brief This function parses the arguments for distortion relevant parameters.
+	/**
+	 * \brief This function parses the XML config file for distortion relevant parameters.
 	 * 
 	 * @return : True if parsing was successful.
 	 */ 
-	bool processCommandlineparameters();
+		bool processXMLConfiguration(); 
 
 	/**
Index: /osgVisual/src/distortion/visual_distortion.cpp
===================================================================
--- /osgVisual/src/distortion/visual_distortion.cpp	(revision 149)
+++ /osgVisual/src/distortion/visual_distortion.cpp	(revision 150)
@@ -66,5 +66,27 @@
 					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
 					if( attr_name == "channelname" )
-						channelname = attr_value;
+					{
+						std::string  channelname = attr_value;
+						OSG_NOTIFY(osg::ALWAYS) << "channelname:" << channelname << std::endl;
+
+						std::string pre_cfg("..\\resources\\distortion\\view_");
+						std::string pre_distortion("..\\resources\\distortion\\distort_");
+						std::string pre_blend("..\\resources\\distortion\\blend_");
+						std::string post_cfg(".cfg");
+						std::string post_distortion(".bmp");
+						std::string post_blend(".bmp");
+
+						// load channel config
+						parser->parseConfigFile((pre_cfg+channelname+post_cfg).data());
+						// load channel blendmap
+						blendMapFileName = (pre_blend+channelname+post_blend).data();
+						// load channel distortionmap
+						distortMapFileName = (pre_distortion+channelname+post_distortion).data(); 
+						// set channel frustum
+						if( parser->isConfigParsed())
+ 							viewer->getCamera()->setProjectionMatrixAsFrustum((parser->getFrustumDataset())[0], (parser->getFrustumDataset())[1], (parser->getFrustumDataset())[2], (parser->getFrustumDataset())[3], (parser->getFrustumDataset())[4], (parser->getFrustumDataset())[5]);
+						else
+							OSG_NOTIFY(osg::WARN) << "WARNING: Unable to parse Frustum values from '" << pre_cfg<<channelname<<post_cfg << "' -- continue without valid frustum values." << std::endl;
+					}
 					if( attr_name == "renderimplemmentation" )
 					{
@@ -105,5 +127,16 @@
 			if(cur_node->type == XML_ELEMENT_NODE && node_name == "distortionmap")
 			{
-
+				xmlAttr  *attr = cur_node->properties;
+				while ( attr ) 
+				{ 
+					std::string attr_name=reinterpret_cast<const char*>(attr->name);
+					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+					if( attr_name == "filename" )
+					{
+						distortMapFileName = attr_value;
+					}
+
+					attr = attr->next; 
+				}
 			}
 
@@ -111,5 +144,16 @@
 			if(cur_node->type == XML_ELEMENT_NODE && node_name == "blendmap")
 			{
-
+				xmlAttr  *attr = cur_node->properties;
+				while ( attr ) 
+				{ 
+					std::string attr_name=reinterpret_cast<const char*>(attr->name);
+					std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+					if( attr_name == "filename" )
+					{
+						blendMapFileName = attr_value;
+					}
+
+					attr = attr->next; 
+				}
 			}
 		}	// FOR all nodes END
@@ -129,47 +173,4 @@
 	}
 
-	return true;
-}
-
-bool visual_distortion::processCommandlineparameters()
-{
-	// Distortion files.
-	arguments.getApplicationUsage()->addCommandLineOption("-C <channelname>","Setup the channel name, this is the preset for blendmap, distortionmap and camera configuration file.");
-
-	arguments.getApplicationUsage()->addCommandLineOption("--distortionmap","Set a distortion map file name.");
-    arguments.getApplicationUsage()->addCommandLineOption("--blendmap","Set a blend map file name.");
-
-	//while (arguments.read("--distortionmap", distortMapFileName)) { }
-    //while (arguments.read("--blendmap", blendMapFileName)) { }
-
-	std::string pre_cfg("..\\resources\\distortion\\view_");
-	std::string pre_distortion("..\\resources\\distortion\\distort_");
-	std::string pre_blend("..\\resources\\distortion\\blend_");
-	std::string post_cfg(".cfg");
-	std::string post_distortion(".bmp");
-	std::string post_blend(".bmp");
-	std::string channelname;
-	while (arguments.read("-C",channelname))
-	{
-		OSG_NOTIFY(osg::INFO) << "channelname:" << channelname << std::endl;
-		// load channel config
-		parser->parseConfigFile((pre_cfg+channelname+post_cfg).data());
-		// load channel blendmap
-		blendMapFileName = (pre_blend+channelname+post_blend).data();
-		// load channel distortionmap
-		distortMapFileName = (pre_distortion+channelname+post_distortion).data(); 
-		// set channel frustum
-		if( parser->isConfigParsed())
- 			viewer->getCamera()->setProjectionMatrixAsFrustum((parser->getFrustumDataset())[0], (parser->getFrustumDataset())[1], (parser->getFrustumDataset())[2], (parser->getFrustumDataset())[3], (parser->getFrustumDataset())[4], (parser->getFrustumDataset())[5]);
-		else
-			OSG_NOTIFY(osg::WARN) << "WARNING: Unable to parse Frustum values from '" << pre_cfg<<channelname<<post_cfg << "' -- continue without valid frustum values." << std::endl;
-	}
-
-	 // report any errors if they have occurred when parsing the program arguments.
-    if (arguments.errors())
-    {
-        arguments.writeErrorMessages(std::cout);
-		exit(1);
-    }
 	return true;
 }
@@ -191,7 +192,4 @@
 	// Process XML configuration
 	processXMLConfiguration();
-
-	// Process Commandline arguments:
-	processCommandlineparameters();
 
 	// Add this node to the scenegraph to get updated during update traversal.
