[Paraview] Writing a Custom Reader

Andy Cedilnik andy.cedilnik at kitware.com
Thu Jul 20 09:38:22 EDT 2006


Hi Mike,

Well, sort of. You can figure out what the colors should be, convert 
that to hue range, then make sure that your cell scalars fall in the 
appropriate location in the hue table.

For example, let say you take hue circle (360 deg) and you use unsigned 
char as a scalar field. First you divide 360 with 256 (unsigned char), 
create a bogus cell on 0 and 255, then you take the rest of the data and 
give it appropriate cell values to fall on the right place.

Does this at all makes sense?

       Andy


Mike Jackson wrote:
> Andy,
>   Thanks for the suggestion. Can I programmatically set up the color 
> lookup table? My "customer" needs the specific colors that are in the 
> file. The colors are part of the analysis.
>
> I am attaching a image file of the final output that I need.
>
> ------------------------------------------------------------------------
>
>
> Thanks
> --------
> Mike Jackson
> IMTS Inc.
>
>
> On Jul 20, 2006, at 9:11 AM, Andy Cedilnik wrote:
>
>> Hi Mike,
>>
>> Why don't you just create a single poly-data or unstructured grid 
>> with a cell centered scalar field that has a unique scalar for each 
>> "particle". Then ParaView will use the lookup table and color each 
>> "particle" with its own color.
>>
>> The problem of using a collection of actors is that there is some 
>> overhead of switching from one actor to another, so you get better 
>> performance if you use a single actor.
>>
>>          Andy
>>
>> Mike Jackson wrote:
>>> Hello,
>>>   Now the Paraview is running on my Intel Mac I am really interested 
>>> in doing some development with it in earnest. The first thing I need 
>>> is a reader to read up our custom data format. I have my notes and 
>>> exercises from a Paraview Class that I attended last year but I 
>>> think I am missing a basic concept.
>>>    My data is a triangle mesh. Within the dataset there are distinct 
>>> "structures" that are completely closed triangles meshes. Each of 
>>> these meshes has a specific color that I want it displayed as. The 
>>> colors are stored in the file.
>>>   I have written a "VTK" loader, ie, I have code that reads the data 
>>> but returns a vtkCollection of vtk3dLODActors. I am guess that 
>>> returning vtkActors may be a bit too high level for Paraview. What 
>>> would be an appropriate data structure to return from my loader?
>>>
>>>     Also, does Paraview/VTK have a file format that retains 
>>> color/material/attribute information for a triangle mesh?
>>>   So for example each completely enclosed triangle mesh, call it a 
>>> "particle", needs a unique ID. The particle will also have a 
>>> specific color/material information associated with it.
>>>
>>>
>>> Thanks for any help or pointers to information.
>>> ------
>>> Mike Jackson
>>> Senior Research Engineer/New Visualization Engineer
>>> mike.jackson at imts.us
>>>
>>>
>>> _______________________________________________
>>> ParaView mailing list
>>> ParaView at paraview.org
>>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>> --Andy Cedilnik
>> Kitware Inc.
>>


-- 
Andy Cedilnik
Kitware Inc.



More information about the ParaView mailing list