Re: [osg-users] [build] iv file not being read

2009-05-15 Thread Mattias Helsing
Hello Abhinav,

There is nothing for anyone to go on to even try to help you. The code
snippet is not even osg code so no chance for us to know anything
about what it does.

* use a debugger to see what readAll returns and why
* crank up OSG_NOTIFY_LEVEL
* see Paul Martz top 10 debugging tips at
http://www.skew-matrix.com/bb/viewtopic.php?f=6t=5

cheers
Mattias


On 5/15/09, Abhinav Dubey dubey.abhin...@gmail.com wrote:
 Hi,
 i am trying to read an iv file but its not being read. the code i am using
 is :
 ***
  SoInput sceneInput;
   if ( !sceneInput.openFile( plugins\\graphs\\myInventor.iv ) ) {
 QMessageBox::information(mInventorGrid[3], Error, Cannot open
 file requested iv file);
 return;
 }

 SoSeparator *sc_root = SoDB::readAll( sceneInput );
sc_root-ref();

  Use one of the convenient SoQt viewer classes.
 mViewer = new SoQtExaminerViewer(iv_widget);
 mViewer-setSceneGraph(sc_root);
 mViewer-setDecoration(false);
 mViewer-show();
 ***
 and the iv file named myInventor.iv has the following:
 #Inventor V2.1 ascii

 Separator {
 SoXipExaminer {
   modeNONE
   viewBoundingBox 230 0 0 0
   0 227.785 0 0
   0 0 42.1032 0
   -112.59 -117.21 50.3972 1
   complexity  Complexity {
   value   0.5
   textureQuality  0.5
   }

   orthoCamera DEF +0 OrthographicCamera {
   }

   perspectiveCamera   DEF +1 PerspectiveCamera {
   position0.181952 88.5125 454.632
   orientation -0.494995 0.0901597 0.864206  0.470889
   nearDistance230.823
   farDistance 557.256
   focalDistance   394.04
   heightAngle 0.785398
   }

   borderNode  SoXipViewportBorder {
   fields [ SFColor activeColor, SFColor inactiveColor,  ]
   activeColor 0.7 0.7 0.7
   inactiveColor   0.7 0.7 0.7
   }

   cameraSwitchSwitch {
   whichChild  1
   USE +0
   USE +1
   }

 }
 SoXipLut {
   fields [ SFEnum inputMode, SFEnum outputMode, SFShort bitsUsed, SFFloat
 rampWidth,
   SFFloat rampCenter, MFColor arrayColor, MFFloat arrayAlpha ]
   inputMode   TRAPEZOID
   outputMode  COLOR
   bitsUsed12
   rampWidth   0.05
   rampCenter  0.009
   arrayColor  [  ]
   arrayAlpha  [  ]
 }
 SoXipImage {
   fields [ SoXipSFDataImage image ]
   image   DATA =
   SoXipLoadDicom {
   inputs [ MFString name ]
   nameC:\Xip\examples\data\24884367.dcm
   outputs [ SoXipMFDataDicom dicom ]
   }
   . dicom

 }
 }
 ***
 when i run the code it crashes at sc_Root.ref();
 plz help me out
 ...


 Thank you!

 Cheers,
 Abhinav

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=12174#12174





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] iv file not being read

2009-05-15 Thread Tomlinson, Gordon
Did you build or install one of the required 3rd Part libraries fro the
Inventor plug-in ?
( see OSG281\src\osgPlugins\Inventor\README.txt)

Also did increase the OSG Notify level to debug to see what OSG may be
telling you about the issue ?

And the other normal debug technique did you step in to the OSG code to
see where its failing on the read ?


Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mattias
Helsing
Sent: Friday, May 15, 2009 3:11 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [build] iv file not being read

Hello Abhinav,

There is nothing for anyone to go on to even try to help you. The code
snippet is not even osg code so no chance for us to know anything about
what it does.

* use a debugger to see what readAll returns and why
* crank up OSG_NOTIFY_LEVEL
* see Paul Martz top 10 debugging tips at
http://www.skew-matrix.com/bb/viewtopic.php?f=6t=5

cheers
Mattias


On 5/15/09, Abhinav Dubey dubey.abhin...@gmail.com wrote:
 Hi,
 i am trying to read an iv file but its not being read. the code i am 
 using is :
 ***
  SoInput sceneInput;
   if ( !sceneInput.openFile( plugins\\graphs\\myInventor.iv ) )
{
 QMessageBox::information(mInventorGrid[3], Error, Cannot 
 open file requested iv file);
 return;
 }

 SoSeparator *sc_root = SoDB::readAll( sceneInput );
sc_root-ref();

  Use one of the convenient SoQt viewer classes.
 mViewer = new SoQtExaminerViewer(iv_widget);
 mViewer-setSceneGraph(sc_root);
 mViewer-setDecoration(false);
 mViewer-show();
 ***
 and the iv file named myInventor.iv has the following:
 #Inventor V2.1 ascii

 Separator {
 SoXipExaminer {
   modeNONE
   viewBoundingBox 230 0 0 0
   0 227.785 0 0
   0 0 42.1032 0
   -112.59 -117.21 50.3972 1
   complexity  Complexity {
   value   0.5
   textureQuality  0.5
   }

   orthoCamera DEF +0 OrthographicCamera {
   }

   perspectiveCamera   DEF +1 PerspectiveCamera {
   position0.181952 88.5125 454.632
   orientation -0.494995 0.0901597 0.864206  0.470889
   nearDistance230.823
   farDistance 557.256
   focalDistance   394.04
   heightAngle 0.785398
   }

   borderNode  SoXipViewportBorder {
   fields [ SFColor activeColor, SFColor inactiveColor,  ]
   activeColor 0.7 0.7 0.7
   inactiveColor   0.7 0.7 0.7
   }

   cameraSwitchSwitch {
   whichChild  1
   USE +0
   USE +1
   }

 }
 SoXipLut {
   fields [ SFEnum inputMode, SFEnum outputMode, SFShort bitsUsed, 
 SFFloat rampWidth,
   SFFloat rampCenter, MFColor arrayColor, MFFloat
arrayAlpha ]
   inputMode   TRAPEZOID
   outputMode  COLOR
   bitsUsed12
   rampWidth   0.05
   rampCenter  0.009
   arrayColor  [  ]
   arrayAlpha  [  ]
 }
 SoXipImage {
   fields [ SoXipSFDataImage image ]
   image   DATA =
   SoXipLoadDicom {
   inputs [ MFString name ]
   nameC:\Xip\examples\data\24884367.dcm
   outputs [ SoXipMFDataDicom dicom ]
   }
   . dicom

 }
 }
 ***
 when i run the code it crashes at sc_Root.ref(); plz help me out ...


 Thank you!

 Cheers,
 Abhinav

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=12174#12174





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
 org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] iv file not being read

2009-05-15 Thread Jean-Sébastien Guay

Hi Abhinav,


i am trying to read an iv file but its not being read. the code i am using is :
***
 SoInput sceneInput;
if ( !sceneInput.openFile( plugins\\graphs\\myInventor.iv ) ) {
QMessageBox::information(mInventorGrid[3], Error, Cannot open file 
requested iv file);
return;
}

SoSeparator *sc_root = SoDB::readAll( sceneInput );
   sc_root-ref();

 Use one of the convenient SoQt viewer classes.
mViewer = new SoQtExaminerViewer(iv_widget);
mViewer-setSceneGraph(sc_root);
mViewer-setDecoration(false);
mViewer-show();
***


That's OpenInventor (and some Qt) code. Are you using OSG or 
OpenInventor? This is an OSG mailing list, and though OSG has an .iv 
loader, we can't help you debug OpenInventor code. Please go to the 
appropriate forum/mailing list for that.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] iv file not being read

2009-05-15 Thread Gordon Tomlinson
1st Question is

Did you build one of the required 3rparty libraries you need for the
inventor plugin ?

See OpenSceneGraph\src\osgPlugins\Inventor\README.txt



2nd Question is did you turn up the Notify Level to see what why it may be
failing or did you step into the code to see why its failing ?


__
Gordon Tomlinson 

gor...@gordontomlinson.com
IM: gordon3db...@3dscenegraph.com
www.vis-sim.com www.gordontomlinson.com 

__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mattias
Helsing
Sent: Friday, May 15, 2009 3:11 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [build] iv file not being read

Hello Abhinav,

There is nothing for anyone to go on to even try to help you. The code
snippet is not even osg code so no chance for us to know anything
about what it does.

* use a debugger to see what readAll returns and why
* crank up OSG_NOTIFY_LEVEL
* see Paul Martz top 10 debugging tips at
http://www.skew-matrix.com/bb/viewtopic.php?f=6t=5

cheers
Mattias


On 5/15/09, Abhinav Dubey dubey.abhin...@gmail.com wrote:
 Hi,
 i am trying to read an iv file but its not being read. the code i am using
 is :
 ***
  SoInput sceneInput;
   if ( !sceneInput.openFile( plugins\\graphs\\myInventor.iv ) ) {
 QMessageBox::information(mInventorGrid[3], Error, Cannot open
 file requested iv file);
 return;
 }

 SoSeparator *sc_root = SoDB::readAll( sceneInput );
sc_root-ref();

  Use one of the convenient SoQt viewer classes.
 mViewer = new SoQtExaminerViewer(iv_widget);
 mViewer-setSceneGraph(sc_root);
 mViewer-setDecoration(false);
 mViewer-show();
 ***
 and the iv file named myInventor.iv has the following:
 #Inventor V2.1 ascii

 Separator {
 SoXipExaminer {
   modeNONE
   viewBoundingBox 230 0 0 0
   0 227.785 0 0
   0 0 42.1032 0
   -112.59 -117.21 50.3972 1
   complexity  Complexity {
   value   0.5
   textureQuality  0.5
   }

   orthoCamera DEF +0 OrthographicCamera {
   }

   perspectiveCamera   DEF +1 PerspectiveCamera {
   position0.181952 88.5125 454.632
   orientation -0.494995 0.0901597 0.864206  0.470889
   nearDistance230.823
   farDistance 557.256
   focalDistance   394.04
   heightAngle 0.785398
   }

   borderNode  SoXipViewportBorder {
   fields [ SFColor activeColor, SFColor inactiveColor,  ]
   activeColor 0.7 0.7 0.7
   inactiveColor   0.7 0.7 0.7
   }

   cameraSwitchSwitch {
   whichChild  1
   USE +0
   USE +1
   }

 }
 SoXipLut {
   fields [ SFEnum inputMode, SFEnum outputMode, SFShort bitsUsed,
SFFloat
 rampWidth,
   SFFloat rampCenter, MFColor arrayColor, MFFloat arrayAlpha ]
   inputMode   TRAPEZOID
   outputMode  COLOR
   bitsUsed12
   rampWidth   0.05
   rampCenter  0.009
   arrayColor  [  ]
   arrayAlpha  [  ]
 }
 SoXipImage {
   fields [ SoXipSFDataImage image ]
   image   DATA =
   SoXipLoadDicom {
   inputs [ MFString name ]
   nameC:\Xip\examples\data\24884367.dcm
   outputs [ SoXipMFDataDicom dicom ]
   }
   . dicom

 }
 }
 ***
 when i run the code it crashes at sc_Root.ref();
 plz help me out
 ...


 Thank you!

 Cheers,
 Abhinav

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=12174#12174





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org