[vtkusers] ImageTracerWidget Transform

sfaisalali91 sfaisal.ali91 at gmail.com
Tue Apr 7 02:15:57 EDT 2015


hi all, 

  I have been working on clipping ROI using ExtractVoi. I am able to clip
the volume using ImageTracerWidget but i am unable to clip the data inside
the widget! It is clipping the volume data away from the widget(as shown in
the attached image). i searched for solution online and found many are
facing the same problem and the closet approach to overcome this was to
implement Transform and do the required scaling. I tried implementing the
same but i am missing something! 

code snippet!

//Initial Implementation
vtkImageTracerWidget->GetPath(PolyData);

Imcast->GetOutput()->GetOrigin(origin);
Imcast->GetOutput()->GetSpacing(spacing);
PolyData->GetPoints()->GetBounds(bounds);
int xmin =  (int)((bounds[0] – origin[0])/spacing[0] + 0.5);
int xmax = (int)((bounds[1] – origin[0])/spacing[0] + 0.5);
int ymin = (int)((bounds[2] – origin[1])/spacing[1] + 0.5);
int ymax = (int)((bounds[3] – origin[1])/spacing[1] + 0.5);
int zmin = (int)((bounds[4] – origin[2])/spacing[2] + 0.5);
int zmax = (int)((bounds[5] – origin[2])/spacing[2] + 0.5);
this->EXvoI->SetVOI(xmin,xmax,ymin,ymax,zmin,zmax);

I made use of the transform callback from (
http://vtk.1045678.n5.nabble.com/Difficulty-keeping-volume-within-vtkBoxWidget-td1240361.html
). I am facing a problem getting the ImagetracerWidget transform(as it is
protected). Can some one please help me restrict the volume inside the
widget!. Thank you in advance. Much appreciate you're help :)


<http://vtk.1045678.n5.nabble.com/file/n5731378/clipped.bmp> 



--
View this message in context: http://vtk.1045678.n5.nabble.com/ImageTracerWidget-Transform-tp5731378.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list