<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello everyone,<BR><BR><BR><BR>I ran into a problem using vtkExtractROI filter. It seems that the bounds I set using "SetVOI" are not correct... They are too big.<BR>To test I did something like that. I created a VOI with this bounds (30,106,0,80,0,60) and I displayed the obtained dataset. Then<BR>I create a vtkCubeSource with the same bounds (except for the x like that the 2 objects are not overlapping and we can see who is who) and when I displayed<BR>it we clearly see that the Z dimension are not the same !?!?! here a the piece of code to see what I'm doing<BR><BR><BR>///// Creation of the VOI<BR>vtkExtractVOI * extractor = vtkExtractVOI::New();<BR><BR>vtkImageData * originalMaskVtkImageData = GetMyImageData ();<BR><BR>        extractor->SetInput(originalMaskVtkImageData);<BR><BR>        extractor->SetVOI(30,106,0,80,0,60);<BR>        extractor->Update();<BR>vtkDataSetMapper *m = vtkDataSetMapper::New();<BR>        m->SetInput(vtkDataSet::SafeDownCast(extractor->GetOutput()));<BR>        vtkActor * v = vtkActor::New();<BR>        v->SetMapper(m);<BR>        m_renderer->AddActor(v);<BR><BR><BR>////// Creation of the Cube<BR>vtkCubeSource * cube = vtkCubeSource::New();<BR>        b[0] = 0;<BR> b[1] = 106;<BR>        b[2] = 0;<BR> b[3] = 80;<BR>        b[4] = 0;<BR>        b[5] = 60;<BR><BR>        cube->SetBounds(b);<BR>        vtkPolyDataMapper *m2 = vtkPolyDataMapper::New();<BR>        m2->SetInput(cube->GetOutput ());<BR><BR>        vtkActor * v2 = vtkActor::New();<BR>        v2->SetMapper(m2);<BR>        m_renderer->AddActor(v2);<BR><BR><BR><BR>here a screenshot showing the problem<BR><BR><BR><a target='_blank' title='ImageShack - Image And Video Hosting' href='http://img186.imageshack.us/i/errorpf.jpg/'><img src='http://img186.imageshack.us/img186/882/errorpf.jpg' border='0'/></a><BR><BR><BR>http://img186.imageshack.us/img186/882/errorpf.jpg<BR><BR><BR>Does someone know why and how can I have the correct bounds ?<BR><BR><BR>Regards,<BR>Adeline<BR><BR><BR><BR><BR><BR><BR>                                            <br /><hr />Windows 7 : Trouvez le PC qui vous convient! <a href='http://clk.atdmt.com/FRM/go/181574577/direct/01/' target='_new'>Découvrez notre offre ! </a></body>
</html>