[vtkusers] orthogonal views through a volume

Rashed Karim rashed.karim at gmail.com
Thu Jul 27 05:46:08 EDT 2006


Hi Rodolfo,

Thanks for the code! I was actually too looking for how I could get
orthogonal views through a volume. I had a question: Does your code allow
you to drag and move the orthogonal slices with a mouse, back and forth? If
you needed this extra functionality, how would you modify your code? I guess
you put some sort of window interactor.

Thanks in advance for your help, and thanks again for the code.


Rashed

On 7/27/06, scsrsao at leeds.ac.uk <scsrsao at leeds.ac.uk> wrote:
>
> Hi Luca,
> I'm attaching you a piece of code I'm using to generate slice views of a
> volume, you should only modify the extent of the slice and create one for
> each
> of the three orthogonal axis... just add to a typical rendering pipeline
> and it
> should work... hope its useful for you... also, there are some medical
> examples
> included in vtk, that should be also useful for you..
>
>         timestepReader = vtkImageReader::New();
>           timestepReader->SetFileName("C:/ramos
> ymas/PROY/data/TS21z_VEL_R2_008000.bin");
>           timestepReader->SetFileDimensionality(3);
>           timestepReader->SetDataScalarTypeToFloat();
>           timestepReader->SetDataByteOrderToBigEndian();
>           timestepReader->SetNumberOfScalarComponents(1);
>           timestepReader->SetDataExtent(0,maxX,0,maxY,0,maxZ);
>           timestepReader->SetDataSpacing(spacing,spacing,spacing);
>           timestepReader->SetDataOrigin(-300000,-150000,-40000);
>
>         timestepFlip = vtkImageFlip::New();
>
>           timestepFlip->SetInput((vtkDataObject*)timestepReader->GetOutput());
>           timestepFlip->SetFilteredAxis(1);
>
>         //initialize Z slice stuff
>         sliceZ = vtkImageDataGeometryFilter::New();
>           sliceZ->SetInput((vtkDataObject*)timestepFlip->GetOutput());
>           sliceZ->SetExtent(0,maxX,0,maxY,maxZ,maxZ);
>
>         sliceZMapper = vtkPolyDataMapper::New();
>           sliceZMapper->SetInput(sliceZ->GetOutput());
>           sliceZMapper->SetLookupTable(scalarBar);
>           sliceZMapper->SetScalarRange(0.0000001, 3.1192195);
>           sliceZMapper->ScalarVisibilityOn();
>
>         sliceZActor = vtkActor::New();
>           sliceZActor->SetMapper(sliceZMapper);
>
> cheers,
> Rodolfo
>
> > Date: Tue, 25 Jul 2006 21:51:02 +0100
> > From: "Luca Pamparana" <deluded.soul at gmail.com>
> > Subject: [vtkusers] orthogonal views through a volume
> > To: vtkusers at vtk.org
> > Message-ID:
> >       <9779cb90607251351w2a19f1eaj18c47910270a41d5 at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Hi everyone,
> >
> > I found out that the ITK Snap toolkit probably displays the three
> orthogonal
> > views through the volume.
> >
> > I would like to know how I can do that with vtk. Do I have to use the
> > vtkImageReslice or is there a better way...
> >
> > Any help would be greatly appreciated. Also, can anyone recommend a good
> > medical image processing book that builds on these basics?
> >
> > Cheers and thanks,
> >
> > Luca
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> >
>
> http://public.kitware.com/pipermail/vtkusers/attachments/20060725/34b575c2/attachment-0001.htm
> >
> > ------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Rashed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060727/b54c99f5/attachment.htm>


More information about the vtkusers mailing list