[Insight-users] read vtkImageData

Massinissa Bandou Massinissa.Bandou at USherbrooke.ca
Thu Nov 14 16:07:37 EST 2013


Hi David,

Thanks for reply. 
Can you tell me what does it do this part of code in:
http://www.itk.org/Wiki/ITK/Examples/IO/ImportImageFilter ???

  for(unsigned int z=0; z < size[2]; z++)
    {
    const double dz = static_cast<double>( z ) -
static_cast<double>(size[2])/2.0;
    for(unsigned int y=0; y < size[1]; y++)
      {
      const double dy = static_cast<double>( y ) -
static_cast<double>(size[1])/2.0;
      for(unsigned int x=0; x < size[0]; x++)
        {
        const double dx = static_cast<double>( x ) -
static_cast<double>(size[0])/2.0;
        const double d2 = dx*dx + dy*dy + dz*dz;
        *it++ = ( d2 < radius2 ) ? 255 : 0;
        }
      }
    }




--
View this message in context: http://itk-users.7.n7.nabble.com/read-vtkImageData-tp32740p32760.html
Sent from the ITK - Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list