[vtkusers] Extracting 2D slices from 3D

Emma Ryan eryanvtk at yahoo.com
Tue Oct 31 23:49:04 EST 2006


Hi all,

  I have a set of 2D .png slices that I read into VTK using vtkPNGReader.
I have no clue where the data goes after that.

 While I would like the 3D volume display, I would also like to have a display of the individual 2D slices, without having to use more memory. 

The following is the code I use to read the .png slices.
  vol2 = vtkPNGReader::New();
  vol2->SetFileDimensionality(2);
  vol2->SetDataByteOrderToLittleEndian();
  vol2->SetFilePrefix ("2938/2938.png");
  vol2->SetDataExtent(0, 255, 0, 255, 0 , 31);
  vol2->SetDataSpacing (1.0, 1.0, 4.0);
  vol2->UpdateWholeExtent();

 I've always stored data in a n*m*k matrix and so its easy to traverse along any given axis.

In VTK, I'm not sure how to do this.

Does anyone have any suggestions ?  Where and how is the data stored in vtk ?

thanks,
Emma



Obada Mahdi <omahdi at gmx.de> wrote: Hi Emma!

On 10/22/06, Emma Ryan  wrote:
> I searched the entire C:  for QVTK.lib, but never found one.  I do however
> see the .h files of QVTKWidget in the GUISupport/QT directory of VTK.
>
> How can I get the QVTK.lib file ?

Did you enable the CMake option "VTK_USE_QVTK" for your VTK build?
Qt stuff will not be built unless it is set to "ON".  You probably
have to switch to "advanced mode" (press 't' in the ccmake curses
dialog) and enable "VTK_USE_GUISUPPORT" before the QVTK option shows
up.


HTH,

Obada


 			
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061031/10136235/attachment.htm>


More information about the vtkusers mailing list