c++ - VTK Marching Cubes from vtkImageReader2 -
i have encountered problems of loading image stack vtkimagereader2 in order perform surface extraction using vtkmarchingcubes.
vtksmartpointer<vtkimagereader2> reader = vtksmartpointer<vtkimagereader2>::new(); reader->setfileprefix("c:\\"); reader->setfilepattern("%d.png"); reader->setdataextent(0,556,0,613,0,200); reader->setdataspacing(1,1,1); reader->setdataorigin(0,0,0); reader->setdatabyteordertolittleendian(); reader->setdatascalartypetounsignedshort(); reader->update(); reader->updatewholeextent();
fyi, image dataset 556x614x201 in dimension.
the image file name example below:
0.png 1.png 2.png , till 200.png
it complains initialize: not open file (randomnumber).png
. reader seems cannot find file prefix , pattern given.
however, after loaded image using vtkstringarray manually setting image path , file name, encountered problem of cannot contour data of dimension != 3
Comments
Post a Comment