adding custom sources to vtk -> what is the best way (was : RE : [vtkusers] Tiff : getting tiff size without reading the whole file)
Sébastien MARAUX
maraux at ondim.fr
Mon Feb 9 07:29:41 EST 2004
Thanks.
I will check this (I may also use TIFF lib directly in my source code ?)
What is the best way to modify a VTK class :
- Copying it in your project and modifying it (in order to be able to
upgrade to next VTK version without too much tuning)
- Modifying code directly in VTK source tree (mode easy / quick for a
single use, but not if I plan to follow VTK new versions)?
- Submit or ask for a code change (in tiff reader, or even in
vtkImageReader2 because this can be useful for any format when handling
huge textures) , and use VTK CVS Version.
S. Maraux
-----Message d'origine-----
De : vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] De la part
de Jeremy Winston
Envoyé : lundi 9 février 2004 13:12
À : vtkusers at vtk.org
Objet : Re: [vtkusers] Tiff : getting tiff size without reading the
whole file
Sébastien MARAUX wrote:
> Hello, is it possible to get a Tiff File Image Size without reading
the
> whole file ?
Look at ${VTK_SRC}/IO/vtkTIFFReader.cxx
The method vtkTIFFReaderInternal::Initialize() makes calls to
TIFFGetField() (which is in ${VTK_SRC}/Utilities/tif_${TARGET}.c
where TARGET is whatever you're compiling for, e.g., win32):
if ( !TIFFGetField(this->Image, TIFFTAG_IMAGEWIDTH, &this->Width)
||
!TIFFGetField(this->Image, TIFFTAG_IMAGELENGTH, &this->Height)
)
{
return 0;
}
Since the *Internal routines are private, you can't call them directly.
You could add a method to vtkTIFFReader that opens the file, and then
makes the calls to TIFFGetField() and returns the product of the values
they return.
-Jeremy(Maybe there's a simpler way, IDK.)
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list