Francois,
Thank you for the reply.
Using 2x2x2 points for one voxel is fine in principle. The difficulty is, you
can't really conveniently (as far as I can tell) use a vtkImageData object for
this purpose. Because now of course our scalar image data needs to be
associated with cells, not to points. But vtkImageData in many cases only
deals with the scalar data attached to the PointData. For example, this is
from vtkImageData.cxx :
//----------------------------------------------------------------------------
// This method returns a pointer to the origin of the vtkImageData.
void *vtkImageData::GetScalarPointer()
{
if (this->PointData->GetScalars() == NULL)
{
vtkDebugMacro("Allocating scalars in ImageData");
this->AllocateScalars();
}
return this->PointData->GetScalars()->GetVoidPointer(0);
}
Notice that is method just grabs the Scalars from PointData, and other methods
of vtkImageData are similar, so if you want to store the scalars in CellData,
which is necessary represent voxels, it is quite difficult.
Eric
> Date: Tue, 1 Jun 2010 13:26:15 -0400
> From: Francois Bertel <[email protected]>
> Subject: Re: [Paraview] Finite-size voxels and Point vs. Cell Centered
> Image Data
> To: [email protected]
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello,
>
> in vtkImageData, "Dimension" is the number of points along each axis,
> not the number of cells along each axis. If you want one voxel, then
> you need 2x2x2 points.
> Note that using GetDimension() is OK but SetDimension() is only here
> for backward compatibility, use SetExtent() instead:
>
> image->SetExtent(0,1,0,1,0,1);
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview