[Insight-users] help generate mesh of binary image

Luis Ibanez luis.ibanez at kitware.com
Sun, 22 Feb 2004 08:39:56 -0500


Hi Longfei,

The complete documentation of the BinaryMask3DMeshSource
class is available at:

http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryMask3DMeshSource.html

For an example on how to use the class you can look at

    Insight/Testing/Code/Algorithms/
              itkBinaryMask3DMeshSourceTest.cxx


Regards,


   Luis


------------------------
Longfei Cong wrote:

> dear Luis Ibanez
>      I have used the Update(),but the retun numbers of poits and cells are zero.it seems that there are no mesh generated. Could you tell me whether there are some other methods? And i want to learn to use the codes of FEM, but there are no guides. Could you tell me how to muster it! Very thank you!
>   
> ======= 2004-02-19 04:43:00 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======
> 
> 
>>Hi Longfei,
>>
>>It seems that you forgot to invoke Update()
>>in the meshSource object before getting its
>>output with GetOutput().
>>
>>ITK uses a data pipeline architecture.
>>No code is actually executed until you invoke
>>Update() on the filters.
>>
>>You may want to pass some quality time
>>reading the software guide
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>and going through the tutorials.
>>
>> http://www.itk.org/HTML/Tutorials.htm
>>
>>That will save you time and unnecessary suffering.
>>
>>
>>Regards,
>>
>>
>> Luis
>>
>>
>>----------------------
>>Longfei Cong wrote:
>>
>>
>>>dear insight-users£¬
>>>        could someone tell me how to generate a mesh of 3d face, which face is segmented bianary image cardiac. I have just used the 'BinaryMask3DMeshSource'. But there are some thing wrong. I can see the number of points and cells,whie the  points of the cells .   
>>>     
>>>	   the relenvant  code ..
>>>//+++++++++++++++++++++++++++++++++++++++++
>>>   meshSource->SetBinaryImage( maskReader->GetOutput() );
>>>    meshSource->SetObjectValue( 200 );
>>>
>>> MeshType::Pointer   meww=MeshType::New();; 
>>> meww=meshSource->GetOutput();
>>>  std::cout << "# Points= " << meww->GetNumberOfPoints() << std::endl;
>>>  std::cout << "# Cell  = " << meww->GetNumberOfCells() << std::endl;  
>>>//+++++++++++++++
>>>//the numeber is 2000  and 4000 which can print in the screen 
>>>//+++++++++++++++ 
>>>typedef MeshType::PointsContainer::Iterator     PointsIterator;
>>>  PointsIterator  pointIterator = meww->GetPoints()->Begin();  
>>>
>>>  PointsIterator end = meww->GetPoints()->End();
>>>  while( pointIterator != end ) 
>>>    {
>>>    MeshType::PointType p = pointIterator.Value();  // access the point
>>>    std::cout << p << std::endl; 
>>>    ++pointIterator;                                // advance to next point
>>>    }
>>> 
>>>¡¡¡¡//++++++++++++++++++++++++++++++++++++++++++++++++++++++¡¡¡¡¡¡¡¡¡¡
>>>
>>> 				
>>>
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Longfei Cong
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lfcong at nlpr.ia.ac.cn
>>>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-02-19
>>>
>>>
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
> 
> 
> = = = = = = = = = = = = = = = = = = = =
> 			
> 
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
> Àñ£¡
>  
> 				 
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Longfei Cong
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lfcong at nlpr.ia.ac.cn
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2004-02-19
> 
> 
> 
> 
>