[vtkusers] Making custom data for a regular 3d voxel grid
Andras Lasso
lasso at queensu.ca
Wed Aug 30 21:30:00 EDT 2017
To learn VTK, I would also strongly recommend to read the VTK textbook, cover to cover, a few times. It is available here:
http://www.vtk.org/vtk-textbook/
Andras
-----Original Message-----
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Bill Lorensen
Sent: Wednesday, August 30, 2017 3:38 PM
To: Daniel Minsky <minsky at tandar.cnea.gov.ar>; VTK Users <vtkusers at vtk.org>
Subject: Re: [vtkusers] Making custom data for a regular 3d voxel grid
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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2F&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=oiB65DtMLDTU%2F22WNdJ%2FfpPOkmM%2BdgwRuFjQX4rFkQQ%3D&reserved=0
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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
>> nsen.github.io%2FVTKExamples%2Fsite%2F%2FCxx%2FImages%2FImageImport%2
>> F&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f
>> 6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sda
>> ta=Bj%2Ff%2Bc8AIpCuVV9%2FdtrtqLUhl%2FfFc%2BKytwnTN42END8%3D&reserved=
>> 0
>>
>> 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
>>> https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&d
>>> ata=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%
>>> 7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdat
>>> a=%2B1Vj127dEv3IpeVL8tejVG3QLkLAMGS1zUeCZTIlAOw%3D&reserved=0
>>>
>>> Visit other Kitware open-source projects at
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>>> kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40qu
>>> eensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4ef
>>> b2838b925c%7C1%7C0%7C636397186987547234&sdata=GAItA4LRMgAHVne%2FLLBv
>>> 2OPmlCrADqfzF91W31hIGG4%3D&reserved=0
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.
>>> vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab
>>> 68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0
>>> %7C636397186987547234&sdata=JGLDIHOgk9V%2BrP2UWVTDVmuqJ1hXX6brzg%2FX
>>> Ft%2B3qlw%3D&reserved=0
>>>
>>> Search the list archives at:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmark
>>> mail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.c
>>> a%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b9
>>> 25c%7C1%7C0%7C636397186987547234&sdata=qwKMUqNKbR3vfKEdsIk9WlswVcYl6
>>> %2BSSliNpEQb3iLo%3D&reserved=0
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpubl
>>> ic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%
>>> 40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582
>>> c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=4qF14Xjq5oo%2FJMxI
>>> AQdLoMKbORB1Y3aZIsFTV%2BfOUdE%3D&reserved=0
>>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>>
>
>
--
Unpaid intern in BillsBasement at noware dot com _______________________________________________
Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=%2B1Vj127dEv3IpeVL8tejVG3QLkLAMGS1zUeCZTIlAOw%3D&reserved=0
Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=GAItA4LRMgAHVne%2FLLBv2OPmlCrADqfzF91W31hIGG4%3D&reserved=0
Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=JGLDIHOgk9V%2BrP2UWVTDVmuqJ1hXX6brzg%2FXFt%2B3qlw%3D&reserved=0
Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=qwKMUqNKbR3vfKEdsIk9WlswVcYl6%2BSSliNpEQb3iLo%3D&reserved=0
Follow this link to subscribe/unsubscribe:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca1af1ab68d4f4dc1c93d08d4efdea9f6%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636397186987547234&sdata=4qF14Xjq5oo%2FJMxIAQdLoMKbORB1Y3aZIsFTV%2BfOUdE%3D&reserved=0
More information about the vtkusers
mailing list