Hello Marc,
Thanks for the reply again. You have been really helpful.
Attached are the images in texture mode and wireframe mode. The image corresponds to the stomach section of the human body surface model i have. I have cutout the face and stuff since i am not supposed to reveal the identity.
>>>> Did you try passing the data through a vtkPolyDataNormals filter ?
Yes i did pass the vtkPolyData through a vtkPolyDataNormals Filter, but it makes no difference. The cracks are still there. Here is the pseudocode :
vtkPolyDataNormals *pMeshNormalGenerator = vtkPolyDataNormals::New(); pMeshNormalGenerator->SetInput( pInputMesh ); pMeshNormalGenerator->SetFeatureAngle( 60.0 ); pMeshNormalGenerator->Update(); Waiting for your reply..... Regards, Deepak
_______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Hello Marc,
Thanks for the reply again. I greatly appreciate your effort.
I see that, the reason behind your cracks has got something to do with the geometry problems rather than texture, as you see the cracks even if the texture is not applied.
Unlike you, in my case if i do not apply the texture, the model exhibits no cracking whatsoever. This is the reason, i was sure that there is something wrong with the texture rather than the geometry in my case.
I am not sure what might be the problem ?
When I pass the data through a quadric decimation algorithm, like you I lose the texture (not sure why) but the cracks disappear.
I guess the reason you loose the texture once you decimate your mesh is may be the per vertex texture information is not calculated by VTK internally for the new decimated mesh. For that reason probably the decimated mesh is displayed in uniform solid color.
I assume you tried ->PreventSeamOn() right?
what is this for.
Waiting for your reply...
On 1/17/06, Marc Cotran <[hidden email]> wrote:
Deepak Roy wrote: _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
In reply to this post by Deepak Roy Chittajallu
Hello Marc,
Seems like a lot of mutually benefiting discussion. I like it.
Infact i was looking for a way to play with the clamping and interpolation options of the texture in VTK. But i found no way to do this.
All vtkTexture provides us is Interpolate On/Off and Repeat On/Off.
Do you know how to change the way the texture interpolation is done.
I hope this might solve my problem.
Eagerly waiting for your reply .....
Regards,
Deepak
On 1/17/06, Marc Cotran <[hidden email]> wrote:
Hi Deepak, _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Hello Marc,
I had the idea of trying different texture interpolation options long back but was impaired by the facility that vtkTexture provides. All that is offered in the public interface of the vtkTexture class is Interpolate On/Off. It does not give me any provision to change the way the interpolation is done.
I also posted a question on VTK long back, but no one replied. I think it is time to post one again.
>> Also, have you tried different texture files? Is the crack pattern, if
reproducible, the same? I have the human body surface models of 10 subjects in the form of vrml files. The pattern of cracks, though not exactly the same in all these cases ( if you are very picky about the exact regions where these cracks are visible) look similar.
I also tried some VRML triangular meshes of Human Faces, by borrowing them from a Face Project group here. I see similar type of cracks even in those face models. All the 3 face models i tested have more or less similar pattern of cracks though not exactly similar.
However in all these cases, if i do not apply the texture there are no cracks whatsoever.
Wiaitng for your comments.....
Regards,
Deepak
On 1/17/06, Marc Cotran <[hidden email]> wrote:
Deepak Roy wrote: Also, have you tried different texture files? Is the crack pattern, if reproducible, the same? > > I hope this might solve my problem. I really don't have enough experience with vtkTextures to say either way... Marc _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Hello Marc,
I tried all three --- shading interpolation options ( Flat , Goroud and Phong ).
There is no differenece. It does not help.
I wonder what the problem is ?
Regards,
Deepak
On 1/17/06, Marc Cotran <[hidden email]> wrote:
Deepak Roy wrote: _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
In reply to this post by Deepak Roy Chittajallu
---------- Forwarded message ---------- From: Deepak Roy <[hidden email]> Date: Jan 17, 2006 5:49 PM Subject: Re: Fwd: [vtkusers] Texture Mapping Problem....Please Help !!!!! To: Ankur Deshmukh <[hidden email]> Hey Ankur,
I am not sure, on to what geometry your are trying to map your texture. And also whether you are repeating the texture all over your medical dataset.
I'll go ahead and describe what i did in my case. Hope it is of some help to you.
My geomtery is a Triangular mesh - an open surface representation of a Human Body. It is initially in the form of a VRML file and i have written custom vtkPolyDataSource Filter that gives me a vtkPolyData of the surface geometry i have.
Once this is done, here is the pseudocode i followed:
****************************************************************************************************************************
vtkPolyData *pVtkMesh = FromVrmlFile( <vrml-model-file> ); // create mesh polydata mapper vtkPolyDataMapper *pMeshMapper = vtkPolyDataMapper::New();pMeshMapper->SetInput( pVtkMesh ); // read texture image from file vtkImageReader2Factory *pImageReaderFactory = vtkImageReader2Factory::New();vtkImageReader2 *pTextureImageReader = vtkImageReader2::New(); pTextureImageReader = pImageReaderFactory->CreateImageReader2(strTextureFile); pTextureImageReader->SetFileName(strTextureFile); // build texture vtkTexture *pModelTexture = vtkTexture::New();pModelTexture->SetInput( pTextureImageReader->GetOutput() ); pModelTexture->InterpolateOff(); pModelTexture->RepeatOff(); // create and setup actor vtkActor * pTorsoTextureActor = vtkActor::New();pTorsoTextureActor->SetMapper( pMeshMapper ); pTorsoTextureActor->SetTexture( pModelTexture ); ************************************************************************************************************* Regards, Deepak
On 1/17/06, Ankur Deshmukh <[hidden email]
> wrote:
Hey Deepak, _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
In reply to this post by Deepak Roy Chittajallu
Hey Ankur,
I cannot get a clear picture.
Can you post your pseudocode ?
Regards,
Deepak
On 1/18/06, Ankur Deshmukh <[hidden email]> wrote:
Hey Deepak, _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers |
Free forum by Nabble | Edit this page |