[vtkusers] cropping a volume

qlizhi qlizhi at gmail.com
Fri May 10 00:19:25 EDT 2013


Hi all.

I wanted to cropping a volume, just the center region is visible.  And i use the GPU-based volume mapper, but it always breakdown on the line assert("check: positive_low_bounds0" && lowBounds[0]>=0.0) of vtkOpenGLGPUVolumeRayCastMapper .

Here is my code:
m_volumeMapper->CroppingOn();
//m_volumeMapper->SetCroppingRegionPlanes(523000.0, 524000.0, 4400000.0, 4403000, 1330.0, 1350.0);
m_volumeMapper->SetCroppingRegionPlanes(30.0, 40.0, 30.0, 40.0, 30.0, 40.0);
m_volumeMapper->SetCroppingRegionFlagsToSubVolume();
m_render->GetRenderWindow()->Render();

Here is the image data:
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
  <ImageData WholeExtent="0 115 0 91 0 134" Origin="518476 4398442 1042" Spacing="100 100 2">
    <Piece Extent="0 115 0 91 0 134">
      <PointData Scalars="ImageScalars">
        <DataArray type="UInt16" Name="ImageScalars" format="appended" RangeMin="0"                    RangeMax="8"                    offset="0"                   />
      </PointData>
      <CellData>
      </CellData>
    </Piece>
  </ImageData>

thank you for your help again!



qlizhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130510/5d963081/attachment.htm>


More information about the vtkusers mailing list