[vtkusers] Making custom data for a regular 3d voxel grid

Bill Lorensen bill.lorensen at gmail.com
Wed Aug 30 15:38:09 EDT 2017


Daniel,

Yes, the learning curve is high. But once you get the basics, you'll
see that VTK  has a consistent architecture. So learning a few
concepts will go a long way. I suggest you work your way through the
new VTK Examples:
https://lorensen.github.io/VTKExamples/site/Cxx/

You can build them all, or one at a time. Making small changes to a
working example is great way to learn a new "language." For the most
part, the examples have a consistent style and flow.

Welcome to VTK,

Bill


On Wed, Aug 30, 2017 at 2:55 PM, Daniel Minsky
<minsky at tandar.cnea.gov.ar> wrote:
> Hi,
> many thanks. I could manage to get the volumetric image with your help and other mailing list members. The
> VTK lerning curve seems to be very hard.
> Kind regards,
> Daniel
>
>
>> Take a look at this example:
>> https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageImport/
>>
>> Note the use of SetInputData rather that SetInputConnection.
>>
>> Bill
>>
>> On Tue, Aug 29, 2017 at 1:20 PM, Daniel Minsky
>> <minsky at tandar.cnea.gov.ar> wrote:
>>> Dear all,
>>>
>>> I am very new to VTK, I could follow the C++ examples to read an image from
>>> disk, however I would like to generate the image inside my program with some
>>> voxel data coming from other object in my code.
>>>
>>> I would like to generate a vtkImageData with a regular 3d voxel grid values.
>>> I do have all the unsigned_char 100x200x40 voxels in a unsigned char array.
>>> All voxels are cubic with 1cm side.
>>>
>>> How do I feed the vtkImageData object with my data array?
>>>
>>> How do I use the vtkImageData? The vtkImageData does not have the
>>> GetOutputPort() method to feed a Mapper and I am very confused about the
>>> correct pipeline.
>>>
>>> My final goal is to make a 3d image of the data within an upper and lower
>>> thresholds and an arbitrary plane slice.
>>>
>>> Kind regards,
>>>
>>> Daniel
>>>
>>> --
>>> Dr. Daniel Minsky
>>> Investigador CONICET - CNEA
>>> Departamento de Física
>>> Centro Atómico Constituyentes - Comisión Nacional de Energía Atómica
>>> Av. Gral. Paz 1499 (B1650KNA) San Martín - Pcia. de Buenos Aires - Argentina
>>> Tel: +54 11 6772 7913
>>> Fax: +54 11 6772 7121
>>> e-mail: minsky at tandar.cnea.gov.ar
>>>
>>>
>>> _______________________________________________
>>> 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 VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list