Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
H3D.org Feeds

Forum Index


Board index » All Posts (datanadu)




Re: reference H3DAPI
#1
Quite a regular
Quite a regular


Hi Markus,

Thanks for the reply. I have already referenced VHTK using a few relevant papers and also Palmerius's thesis.

I ended up referenced H3DAPI as you suggested and also included a reference to the wiki page.

thanks,

Posted on: 2010/11/6 13:40
Top


reference H3DAPI
#2
Quite a regular
Quite a regular


Hi guys,

Firstly, thanks for all your help with H3DAPI and VHTK during the past year, I would not have been able to complete my thesis project or take it to the current level without your help and guidance.

I have one final question, how should I reference H3DAPI in a thesis or paper?

thank you,

Trang,

Posted on: 2010/10/25 15:28
Top


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


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
Top


Re: Error when executing VHTK example
#4
Quite a regular
Quite a regular


Hi,

that just means H3DLoad/H3DViewer cannot find VHTK library. Firstly, I think you should make sure of the followings:

1. Have you run Install to install the .dll library?

2. if you have and the example still doesn't work, then just find where your library is and insert it where the AutoSOload in the .x3d code. For example:
<ImportLibrary library='J:VHTKbinVHTK_vc9.dll' />


3. You need to check the directory of the python files as well but I can't remember what was the problem with them.

I hope that would help,

trang

Posted on: 2010/10/1 9:08
Top


Re: Volume Probe
#5
Quite a regular
Quite a regular


Thanks Karlu,

It works like a charm. Before I had:

<IMPORT inlineDEF="H3D_EXPORTS" exportedDEF="HDEV" AS="HDEV"/>
<
ROUTE       
      fromNode
="HDEV" fromField="trackerOrientation"       
      
toNode="INFO" toField="orientation" />  
<
ROUTE       
      fromNode
="INFO" fromField="position"           
      
toNode="probePRE" toField="probe" />


And It didn't work. Do you have any idea why?

Thanks again,

Posted on: 2010/9/15 3:01
Top


Volume Probe
#6
Quite a regular
Quite a regular


Hi Karlu,

I'm having trouble with VolumeProbe not returning the correct values. It seems, it works fine as long as I don't rotate the volume around.

The volume being rendered is different from the volume being probed though they shares the same transform.

I tried to fix this bug but I'm not very sure what went wrong.

Can you please give me some guidance ?

thank you for your time,

Posted on: 2010/9/13 4:18
Top


Re: alpha blending
#7
Quite a regular
Quite a regular


Thank you,

I'm implementing in using the third solution. The alpha value occupied 1-2048 and the color volume is from 2^14 - 2^16. And it works.

I can change the alpha blending on the flight by updating the RGB transfer function.

Thank you a lot,

Posted on: 2010/9/13 3:16
Top


Re: Composed volumes
#8
Quite a regular
Quite a regular


Quote:
does the the pixel_data + bytepercomponent statement that you give to writeFloatasRational behave as you sexpect it to?


This brings me to another question. How should color (RGBA) be set? That is, should RGBA be 0x0000ff00 or R= 0.00 (float 32 bits), G = 0.00 , B = 1.00 and A = 0.00 ?

Anyway, I found a way of getting VolumeRenderer (in VHTK) render my composed volume in color using a color map.

Thank you very much for your help, Markus. Really, you're superb in these H3DAPI stuffs.

Posted on: 2010/9/6 14:56
Top


alpha blending
#9
Quite a regular
Quite a regular


Hi Karlu,

I have two volumes of MRI data. I managed to have one volume (processed data) displayed as a color volume using the RGBFunction for VolumeRenderer. Now I need to blend the color volume on top of a gray-scale volume (to reveal the anatomy).

Is there any node/function in VHTK which will do this?

I can sort of having this done by messing around with the RGBFunction again but it is a requirement of the project to have the alpha blending adjustable on the flight. I have very limited experience with OpenGL. I have been studied VHTK and your papers/thesis so I know VHTK better.

thank you for your guidance,

Trang

Posted on: 2010/9/2 8:01
Top


Re: Composed volumes
#10
Quite a regular
Quite a regular


Hi Markus,

This is what I did and it seemed to be not working very well:

This is my constructor
value = new PixelImagewidthheightdepth
                 
8*byteperpixel,                            
                 
Image::RGBA,    
                 
Image::RATIONAL,              
                 
data
                 
false,                             
                 
image_0->pixelSize() )
;


The each component of data is calculated using the function:

void make_normalfloattargetTsourcePRETsourcePOST1TsourceLASTint N ){       
float H 0;        
float S 0;        
float V 0;        
float C 0;        
// each component of rgba is a H3DFloat, i.e byte_to_read == 4 or 8 (32 bits or 64 bits)        
// for memory's sake, use byte_to_read = 4        
unsigned int bytepercomponent 4;        
unsigned int byteperpixel bytepercomponent*4// one for each of RGBA component       
// locate memory for each of the pixel (re-useable in the for-loop)        
unsigned char *pixel_data = new unsigned char[byteperpixel];       
for( 
int i i++ ){         
if ((
sourcePOST1[i]==0) || (sourcePRE[i] == 0)){           
0;            
0; }         
else {           
sourcePOST1[i]/sourcePRE[i]  - 1.0f// value (S and V)            
= (sourcePOST1[i] - sourceLAST[i])/sourcePOST1[i] ; // Chroma          }       
//HUE       if(C > 0.1) { H = 0;}       
else if(< -0.1) {0.3;}        
else {
0.1;}          
Vec3f hsv H3D::Vec3f(H,V,V);       
H3DUtil::RGB rgb;        
rgb.fromHSV(hsv);         
H3DUtil::RGBA rgba RGBA(rgb.r,rgb.g,rgb.b,100*sourcePRE[i]);         
// assign each component of rgba into pixel_data               
writeFloatasRational(rgba.rpixel_databytepercomponent);        
writeFloatasRational(rgba.gpixel_data bytepercomponentbytepercomponent);       
writeFloatasRational(rgba.bpixel_data 2*bytepercomponentbytepercomponent);
writeFloatasRational(rgba.apixel_data 3*bytepercomponentbytepercomponent);        
// write pixel_data into the corresponding pixel value        
memcpy(&target[i], pixel_databyteperpixel);      }   }


My volume rendered into a volume of the right size but it look like a 4 by 4 matrix of near identical volumes.

Any idea what happened here?

Any comment is very much appriciated.

Thanks in advanced,

Trang

Posted on: 2010/8/18 5:15
Top



TopTop
(1) 2 3 4 »






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