02.05.2013 Views

Primjena biblioteke VTK u vizualizaciji znanstvenih podataka - Pmf

Primjena biblioteke VTK u vizualizaciji znanstvenih podataka - Pmf

Primjena biblioteke VTK u vizualizaciji znanstvenih podataka - Pmf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>VTK</strong>vis4Dmain.cxx<br />

#include "CommandInterpretation.h"<br />

#include "Message.h"<br />

#include "vtkMyCallback.h"<br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

#include <br />

int main( int argc, const char* argv[] )<br />

{<br />

CommandInterpretation *command=new CommandInterpretation(argc, argv);<br />

//NEPOZNATA NAREDBA<br />

if(command->isUnknown())<br />

Message::exitError("Nepoznati parametri. Pokrenite program sa opcijom -h za pomoc.");<br />

//HELP<br />

if(command->isHelp())<br />

{<br />

Message::help();<br />

return 0;<br />

}<br />

//ako smo tu, zadana je datoteka za citanje<br />

vtkXMLImageDataReader *reader=vtkXMLImageDataReader::New();<br />

if(!reader->CanReadFile(command->getFileName()))<br />

Message::exitError("Nije moguce citati zadanu datoteku.");<br />

reader->SetFileName(command->getFileName());<br />

reader->Update();<br />

//spremamo granice ucitanih <strong>podataka</strong><br />

double dataBounds[6];<br />

reader->GetOutput()->GetBounds(dataBounds);<br />

//spremamo raspon pridruzenih skalara<br />

double scalarBounds[2];<br />

36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!