[vtkusers] about vtkBMPReader
Matei MANCAS
matei.mancas at tcts.fpms.ac.be
Tue May 27 03:07:21 EDT 2003
data->sl1 = data->gui_aff_du->value(); //Here I get from my GUI the first
image (for you slice 1)
const char* pre=data->gui_aff_prefixe->value();
const char* var=data->gui_aff_variable->value();
const char* post=data->gui_aff_postfixe->value();
char path[1024] = "";
char numer[20] = "";
strcat(path,data->patoge);
strcat(path,"/");
char* prepart = strcat(path,pre);
strcat(numer,"%s%.");
strcat(numer,var);
strcat(numer,"d");
data->postpart = strcat(numer,".bmp");
//All this means for you :
//if your files are : file0001.bmp to file0018.bmp then :
//prepart=your_path/file
//postpart=%s%4d.bmp
vtkBMPReader *noduleReader = vtkBMPReader::New(); //New reader
noduleReader->SetFilePrefix(prepart); //set prefix
noduleReader->SetFilePattern(data->postpart); //set postfix
noduleReader->SetFileNameSliceOffset(data->sl1); //set first slice
noduleReader->SetDataExtent(0,511,0,511,0,18); //for you...
noduleReader->SetDataSpacing(1,1,1); //if you want equal spacing ...
noduleReader->Update(); //don't forget to update!
then you have your reader !!!
Hope it helps
Matei
----------------------------------------------------------------------------
--------
----- Original Message -----
From: "Chenzhuo" <cz_lj at yahoo.com.cn>
To: <vtkusers at public.kitware.com>
Sent: Tuesday, May 27, 2003 2:53 AM
Subject: [vtkusers] about vtkBMPReader
> Hi,all vtkusers
> Who can give me some program codes about reading
> 18 BMP images and each image consists of 512*512
> pixels.If you can't give me the codes,maybe some of
> you can tell where I can find the code.I am very eager
> to get the codes in my work.Please help me!Thank you!
>
> Chenzhuo
>
>
> _________________________________________________________
> Do You Yahoo!?
> 相见不如聊天!不出门一样面对面!网络摄像头对对派送中~赶快用你的雅虎电邮帐号
参与吧……
> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list