[GRASS-user] r.out.vtk RGB visualization issue in Mayavi

Casey Vandenberg casey.vandenberg at sjgeophysics.com
Thu Jun 25 19:52:18 EDT 2009


A few weeks ago there was some discussion regarding exporting an RGB 
image as a .vtk file for visualization in paraview.

I am able to export RGB images successfully to display them in paraview 
using:

r.out.vtk input=MyMap at PERMANENT 
output=/home/cvandenberg/Desktop/MyMap.vtk elevation=DEM at PERMANENT 
rgbmaps=MyMap.red at PERMANENT,MyMap.green at PERMANENT,MyMap.blue at PERMANENT

I then display them in Paraview by selecting 'colour by RGB image' and I 
uncheck the map scalers box, but I can not figure out how to display the 
same file properly in Mayavi2 (Mayavi version 3.1.0 VTK version 5.0.4).

When loading the same file in Mayavi and creating a surface of it, I do 
not have an option to select the RGB image in the Points Scaler Name 
field. Also, when I turn off the scalers option, the surface will only 
display in grayscale.

At this stage I am not certain what I am doing wrong in terms of getting 
RGB images into Mayavi. If anybody has any suggestions it would be 
greatly appreciated.

Thanks,

Casey





grass-user-request at lists.osgeo.org wrote:
> Send grass-user mailing list submissions to
> 	grass-user at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.osgeo.org/mailman/listinfo/grass-user
> or, via email, send a message with subject or body 'help' to
> 	grass-user-request at lists.osgeo.org
>
> You can reach the person managing the list at
> 	grass-user-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of grass-user digest..."
>
>
> Today's Topics:
>
>    1. Re: r.out.vtk RGB / input issue (S?ren Gebbert)
>    2. Location Wizard error (Luca Casagrande)
>    3. Re: Criteria for v.clean tool=rmdangle (Dwight Needels)
>    4. Re: problems compiling grass 7 (G. Allegri)
>    5. Re: v.lidar.edgedetection very slow (John Tate)
>    6. Re: Location Wizard error (Hamish)
>    7. v.out.ogr to KML ERROR 1: Latitude is invalide (maven apache)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 18 Jun 2009 22:50:37 +0200
> From: "S?ren Gebbert" <soerengebbert at gmx.de>
> Subject: Re: [GRASS-user] r.out.vtk RGB / input issue
> To: "Peter L?we" <peter.loewe at gmx.de>,	grass-user at lists.osgeo.org
> Message-ID: <20090618205037.22470 at gmx.net>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Peter,
> you have to disable the "Map Scalars" check button in the display tab to
> avoid the use of a lookup table.
>
> Best regards
> Soeren
>
> -------- Original-Nachricht --------
>   
>> Datum: Thu, 18 Jun 2009 16:16:08 +0200
>> Von: "Peter Löwe" <peter.loewe at gmx.de>
>> An: "Sören Gebbert" <soerengebbert at gmx.de>, grass-user at lists.osgeo.org
>> Betreff: Re: [GRASS-user] r.out.vtk RGB / input issue
>>     
>
>   
>> Hi Sören,
>>
>> thanks for your fast help - the patch works.
>>
>> However, only limited success on the paraview-side (Paraview 3.4.0)
>>
>>     
>>> In paraview 3.x select the display tab and choose "Color by" to switch
>>> from input scalars to rgb scalars. 
>>>       
>> This works, but results in a strangely colored image which bears little
>> resemblance to the visualisation in GRASS with d.rgb or r.composite.
>>
>> How can a similar coloring scheme be achieved in Paraview like the one for
>> the source data in GRASS ?
>>
>> Peter
>>
>> -------- Original-Nachricht --------
>>     
>>> Datum: Thu, 18 Jun 2009 13:09:58 +0200
>>> Von: "Sören Gebbert" <soerengebbert at gmx.de>
>>> An: peter.loewe at gmx.de, grass-user at lists.osgeo.org
>>> Betreff: Re: [GRASS-user] r.out.vtk RGB / input issue
>>>       
>>> Hello Peter,
>>> i have checked this issue. 
>>> The behavior of r.out.vtk is correct.
>>>
>>> An input must be provided, this is not optional.
>>> To change this, you have to apply this little patch:
>>>
>>> ===================================================================
>>> --- parameters.c        (Revision 37861)
>>> +++ parameters.c        (Arbeitskopie)
>>> @@ -29,6 +29,7 @@
>>>  void set_params()
>>>  {
>>>      param.input = G_define_standard_option(G_OPT_R_INPUTS);
>>> +    param.input->required = NO;
>>>
>>>
>>>
>>> If you use the rgb and the input parameter (which is the default), 
>>> then you have to choose which data has should be displayed in your
>>> visualization software. By default, the input scalars are the "active"
>>> scalar array in the vtk output file.
>>>
>>> e.g:
>>> In paraview 3.x select the display tab and choose "Color by" to switch
>>> from input scalars to rgb scalars. 
>>>
>>> Best regards
>>> Soeren
>>>
>>> -------- Original-Nachricht --------
>>>       
>>>> Datum: Wed, 17 Jun 2009 15:18:23 +0200
>>>> Von: peter.loewe at gmx.de
>>>> An: grass-user at lists.osgeo.org
>>>> Betreff: [GRASS-user] r.out.vtk RGB / input issue
>>>>         
>>>> hi,
>>>>
>>>> i am using v.out.vtk on grass6.3 on suse.
>>>>
>>>> trying to export 2.5d rgb-maps to paraview using r.out.vtk always ends
>>>>         
>>> up
>>>       
>>>> with an error message:
>>>>
>>>> According to the module's manual it should be possible to export a
>>>>         
>>> RGBmap
>>>       
>>>> + dem by using the parameters
>>>>
>>>> rgbmaps=redmap,bluemap,greenmap elevation=my_dem output=result.vtk
>>>>
>>>> However, the module reports that the INPUT parameter has to be
>>>>         
>> provided.
>>     
>>>> trying 
>>>>
>>>> input=rgbmap rgbmaps=redmap,bluemap,greenmap elevation=my_dem
>>>> output=result.vtk
>>>>
>>>> results in the same as 
>>>>
>>>> input=rgbmap elevation=my_dem output=result.vtk
>>>>
>>>> In both cases "result.vtk" is displayed with interpolated false
>>>>         
>> colors.
>>     
>>>> How can a RGB composite created in GRASS properly be transferred and
>>>> displayed in Paraview ?
>>>>
>>>> Peter
>>>> -- 
>>>> Dr. Peter Löwe
>>>> <peter.loewe at gmx.de>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
>>>>         
>>> Telefonanschluss
>>>       
>>>> für nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> grass-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>         
>>> -- 
>>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>>       
>> -- 
>> Dr. Peter Löwe
>> <peter.loewe at gmx.de>
>>
>>
>>
>>
>>
>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>     
>
>   



More information about the grass-user mailing list