Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
H3D.org Feeds


Browsing this Thread:   1 Anonymous Users






error in creating new node in VHTK
#1
Quite a regular
Quite a regular


See User information
Hi Karlu,

I'm creating a simple region growing node in VHTK. However, I ran into an unexpected error in my constructor. Here is the code for the constructor:


H3DNodeDatabase SegmentingVolume::database "SegmentingVolume",    
&(
newInstance<SegmentingVolume>),    
typeidSegmentingVolume ),   &VHTKScalarImageNode::database );  
namespace 
SegmentingVolumeInternals {  
 
FIELDDB_ELEMENTSegmentingVolumescalarVolumeINPUT_OUTPUT );   
FIELDDB_ELEMENTSegmentingVolume probeINPUT_ONLY ); } 
 
SegmentingVolume::SegmentingVolume 
(     H3D::InstH3D::SFNode         _metadata     ,   
      
H3D::InstH3D::Field          _dataChanged  ,    
      
H3D::InstH3D::SFBool         _scaleVectors ,   
      
H3D::InstSFImage             _image        ,   
      
H3D::InstSFScalarImageNode _scalarVolume ,  
      
H3D::InstH3D::SFVec3f      _probe        ,  
      
H3D::InstH3D::SFVec3f      _histogram    ,     
      
H3D::InstH3D::SFMatrix4f   _transform     ) :  
     
VHTKScalarImageNode_metadata,        
                       
_dataChanged,                       
                      
_scaleVectors,   
                     
_image ),   
    
scalarVolume_scalarVolume ),   
    
probe(_probe),   
    
histogram(_histogram),    
    
transform(_transform) {      
      
type_name "SegmentingVolume";   
      
database.initFieldsthis );      
      
transform->setOwnerthis );   
      
probe->setValueVec3f(0,0,0));    
      
histogram->setValueVec3f(0,0,0)); 
      
scalarVolume->routeNoEventimage );   
      
transform   ->routeNoEventimage );    
      
probe       ->routeNoEventimage );  }

The error it gave me was:
1>....srcSegmentingVolume.cpp(44) : error C2664'std::auto_ptr<_Ty>::auto_ptr(_Ty *) throw()' cannot convert parameter 1 from 'H3D::Inst<T>' to 'VHTK::SFScalarDataNode *' 1>        with 
1
>        [ 
1>            _Ty=VHTK::SFScalarDataNode 
1
>        ] 
1>        and 
1>        [ 
1>            T=VHTK::SFScalarImageNode 1>        ] 1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called


Interestingly, this was pointed to the line of :

transform(_transform);


I picked my ears over the last 2 hours to solve this error but I have no idea what was the problem.

Can you please give me some guidance is this?

thank you very much,

trang

Posted on: 2010/10/1 9:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: error in creating new node in VHTK
#2
Webmaster
Webmaster


See User information
The visual studio debugger treats this part as one line:
VHTKScalarImageNode_metadata,        
                       
_dataChanged,                       
                      
_scaleVectors,   
                     
_image ),   
    
scalarVolume_scalarVolume ),   
    
probe(_probe),   
    
histogram(_histogram),    
    
transform(_transform)

So the problem is on that line, I am pretty sure that it refers to the scalarVolume variable.
_scalarVolume is of type VHTK::SFScalarImageNode and scalarVolume seems to be (according to the error message) of type VHTK::SFScalarDataNode.

Posted on: 2010/10/1 15:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]





(C) 2012 SenseGraphics AB    ---    Powered by XOOPS