[vtk-developers] Description of file you are about to read
Sebastien BARRE
sebastien.barre at kitware.com
Thu Mar 14 11:04:12 EST 2002
At 3/14/2002 10:45 AM, Andy Cedilnik wrote:
>>More seriously, who would decide the kind of "useful" infos returned by
>>the reader ? And why in English ?
>
>Well, VTK is written in "english". If you say PrintSelf, it returns
>infromation in "english".
VTK is written in English. But VTK is the API. Your application, hopefully,
does not have to be written in English (look at VolView). And since what we
are talking about here is definitely something that is GUI/application
related, that is a legitimate usability question: you do not use that info
to "programmatically" decide something, but to let the user decide
something. So what's the point if the user can not understand that info: it
can not make the decision, or even worse, can make a wrong decision.
I agree with your default value scheme (the example you give at the end of
your email), but I think it would be cool if it could be overridden :)
>>Since it's typically something aimed at better GUIs and user-application
>>communication, I would suggest that the user (i.e. developper) could
>>specify a kind of prinft-style format/mask/pattern to be used to return
>>these infos (like the SetFilePattern of vtkImageReader).
>>
>>For example:
>>SetFileInformationPattern("Size: %S, Bit depth: %D");
>>=> would return "Size: 512x512, Bit depth: 24b" as info (for example)
>>SetFileInformationPattern("Taille: %S, Profondeur: %D");
>>=> same in Axes of Evil language
>>SetFileInformationPattern("Patient Name: %N");
>>etc.
>
>Ok, what about readers that do not have bit depth?
Sure, but the question is: what about a default pattern, and/or a pattern
for each reader.
>What about one that do not have
>Taille and Profondeur? Or Velikost in Stevilo Bitov?
C'mon, we all know that all images have a least some bits of Velikost, and
some ancient books also report that Stevilo Bitov were found in GIF files
as well as meteorites.
>Still, there should be a "universal" way of retrieving a plain text short
>message that describes
>the file, for example:
>
>vtkTIFFReader tiff
>tiff SetFileName "smallliz.tif"
>tiff UpdateInformation
>puts [ tiff GetDescription ]
>
>would result in:
>TIFF Image 160x160x256 made with "HP IL v1.1" (old style JPEG compression)
I'm sorry, but "HP IL v1.1" for a french user is actually an insult which
will definitely make him close the app, format the disk and give anyone
full legal right to blow your car.
--
Sebastien Barre
More information about the vtk-developers
mailing list