[vtkusers] Rendering short data

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Mar 2 03:34:41 EST 2009


Please CC the vtkusers ml thanks.

Try with one slice and get it to work first. Then you need to fix your
input source so that your volume is contiguous, volume are expected to
be a contiguous block of memory in VTK.

2cts

On Mon, Mar 2, 2009 at 8:15 AM, Rolf Anders Syvertsen
<Rolf.Anders.Syvertsen at rikshospitalet.no> wrote:
> The data is from memory. And I have looked at that test (example), but I can't get it to work. I can't get the data to the renderer. When I try to connect the vtkImageImporter's GetOutputPort() it crashes.
>
> And What do I use to add the stack of images together to a volume?
>
>
> Rolf Anders Syvertsen
> Software Developer
> IMI (Institute for Medical Informatics)
> Radiumhospitalet, Oslo Universitetssykehus HF
> email: rolf.anders.syvertsen at rikshospitalet.no
>
> Denne meldingen inneholder ikke sensitiv informasjon som bryter med Rikshospitalets krav til informasjonssikkerhet.
> (In compliance with the Security Policy of Rikshospitalet , the content of this message (including any attachments) is of a non-sensitive nature)
>
>
>
>
>
> -----Opprinnelig melding-----
> Fra: Mathieu Malaterre [mailto:mathieu.malaterre at gmail.com]
> Sendt: 27. februar 2009 14:19
> Til: Rolf Anders Syvertsen
> Kopi: vtkusers at vtk.org
> Emne: Re: [vtkusers] Rendering short data
>
> On Fri, Feb 27, 2009 at 1:58 PM, Rolf Anders Syvertsen <Rolf.Anders.Syvertsen at rikshospitalet.no> wrote:
>> Hi, I have a series of 16 bit data that I would like to make a volume from.
>> How do I load the data into vtk and render them? Tried to use the
>> vtkImageImporter but can't find out how to make it work. The ReadImage
>> function in vtkVolume16Reader is protected, so I can't use that directly.
>>
>> Does anyone have a simple example of how to load and render the volume
>> from this?
>>
>
> Are you reading from memory or from a file ? If reading from a file:
> lookup doxygen for vtkImageReader. Otherwise an example can be found in the following test:
>
>
> http://www.vtk.org/doc/nightly/html/classvtkImageImport.html
> [scroll down to test section]
> -> http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Imaging/Test
> -> ing/Cxx/ImportExport.cxx?root=VTK&content-type=text/plain
>
>
> --
> Mathieu
>



-- 
Mathieu



More information about the vtkusers mailing list