[Insight-users] Area of a projectile

Rita Jeronimo rita.jeronimo at hotmail.com
Tue Oct 23 05:57:36 EDT 2012


Hello everyone :)

I was wondering if you could help me doing an algorithm that does the area of a projectile (more specifically a bullet).
I already have a part of a code:
...
reader -> update ();
spacing = reader -> GetOut () -> GetSpacing ();double dx = spacing [0];double dy = spacing [1];double dA = dx * dy;
// Calculates the number of white pixels in the image given
long n=0;
it ( read -> Getput () , region)
it.GotoBegin ();
while ( !it.IsAtEnd() ){
if ( it Get() ) n++;++ it;
}
// std::cont <<"n=" <<n <<std::endl;
// calculating the area
A = (double) ny * dA;
std:: cout << A << "mm2"
// save the file .dat

This algorithm returns the area and writes it in a file .dat ou .txt.
Hope you can help me :)

Best regards,
Rita Jerónimo 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121023/1a72f947/attachment.htm>


More information about the Insight-users mailing list