[vtkusers] unwanted cliping in vtkStructuredPoints?

Ross Hennessy R.Hennessy at acfr.usyd.edu.au
Fri Jul 12 01:14:46 EDT 2002


Hi,

    I want to volume render a set of 3D points and when I create vtkStructuredPoints to represent the data, I have a problem where the points seem to be clipped occasionally. To create the structured points I do the following ...

m_output = vtkStructuredPoints::New();
 float bounds[6];
 m_source->GetBounds(bounds);
 int x1,x2,y1,y2,z1,z2;
 x1 = (int)(floor(bounds[0]));
 x2 = (int)(ceil(bounds[1]));
 y1 = (int)(floor(bounds[2]));
 y2 = (int)(ceil(bounds[3]));
 z1 = (int)(floor(bounds[4]));
 z2 = (int)(ceil(bounds[5]));

 m_iVal = (x2 - x1 + 1);
 m_jVal = (y2 - y1 + 1);
 m_kVal = (z2 - z1 + 1);

 m_output->SetDimensions(m_iVal * m_xResolution, m_jVal * m_yResolution, m_kVal * m_zResolution);
 m_output->SetSpacing((1.0 / m_xResolution) ,(1.0 / m_yResolution) ,(1.0 / m_zResolution)); 
 m_output->SetOrigin(x1,y1,z1);
 m_output->SetScalarTypeToUnsignedShort();
 m_output->Update();


where m_*Resolution *=x,y,z are parameters that specify the resolution of the structured points in each dimension. Is this the correct way to used structured points? Most of the time this displays the correct size volume, but some of the time on large structures it seems to clip the volume in some dimensions. I am using a vtkVolumeTextureMapper2D to render the volume, and was wondering if there was a maximum size for the structured points or if the clipping is a feature that can be controlled in volume rendering?

thanks in advance
regards Ross

    



--------------------------------------------------------------------------------


      Ross Hennessy  
      Australian Centre for Field Robotics
      Rose Street Building, J04
      University of Sydney, 
      NSW 2006, Australia
     
            Phone: +61 2 9351 3040  
            Fax: +61 2 9351 7474  
     

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020712/81bdeb3a/attachment.htm>


More information about the vtkusers mailing list