[vtkusers] GetOrientation()

Sean McInerney seanm at nmr.mgh.harvard.edu
Tue Aug 17 17:27:27 EDT 2004


Hi David,

   A generic metadata API with some specific subclasses could be a 
useful addition to vtkDataSet's bag of tricks. Anything other than cell 
or point attributes could be subsumed by a "vtkMetaData" object. I wish 
that this idea dovetailed nicely into a vtkFieldData or 
vtkDataSetAttributes subclass, but it would probably need to handle more 
heterogeneous data than those seem to accommodate (not array-based). 
Maybe there's room for a new base class to vtkFieldData. If not for now, 
perhaps for VTK 6 ;-)

-Sean

David Gobbi wrote:
> Hi Sean,
> 
> I agree with you 100%, but I would go even farther.  The vtkDataObject
> supports a vtkFieldData that more-or-less allows you to put whatever data
> you want inside of the object.  It would be great if there was an
> "InformationData" or some such associated with the object that
> carried information about how to interpret the data.  A vtkFieldData
> object could be used to store the information.
> 
> For example, if you wanted to associate an "Orientation" with a
> vtkImageData, you could add a 3x3 data array named "Orientation" to the
> InformationData that held the orientation.  A filter would be able to
> read and modify the Orientation info as desired in the
> ExecuteInformation() method.
> 
> This information would be exactly as you say: it would be "metadata"
> that could be stored in the files just like the image extent, spacing,
> etc. are currently stored in the files.
> 
>  - David
> 
> 
> On Tue, 17 Aug 2004, Sean McInerney wrote:
> 
> 
>>It might be a nice extension to the vtkImageData or vtkStructuredPoints
>>classes to include an RAS permutation matrix or, at least, to make some
>>provision for axis labeling. This metadata could also be an extension to
>>the VTK image file format(s). This should be easy to add without
>>breaking backwards compatibility (except probably binary) and with
>>minimal memory overhead. It seems like such a basic part of imaging work
>>that it need not be application specific. Seems like a good candidate
>>for a library API ... like VTK. Doing this right within the library
>>would be a real boon.
>>
>>-Sean
>>
>>David Gobbi wrote:
>>
>>>Hi Pallavi,
>>>
>>>There is no "orientation" for vtkImageData.  The data is always arranged
>>>according to an x,y,z data coordinate grid: column number increases with
>>>x, row number increases with y, slice number increases with z.  (Unless
>>>spacing is negative, in which case col number decreases with x etc)
>>>
>>> - David
>>>
>>>On Tue, 17 Aug 2004, Pallavi Joshi wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>Is it possible to get the orientation of a grid or a vtkImageData ?
>>>>
>>>>-------------------------------------------------------------------
>>>>Pallavi Joshi
>>>>Graduate Student
>>>>Medical Image Processing Lab
>>>>
>>
> 
> 



More information about the vtkusers mailing list