// wxBoxSizer *dialSizer = new wxBoxSizer(wxVERTICAL);
wxFlexGridSizer *dialSizer = new wxFlexGridSizer(1);
- wxString lstOptOperation[2];
- lstOptOperation[0]=_T("By Dimension");
- lstOptOperation[1]=_T("By Spacing");
- wxRadioBox * radioOpts = new wxRadioBox(dial, -1, _T("Type of Transformation"), wxDefaultPosition, wxSize(270,90), 2 , lstOptOperation, 2, wxRA_SPECIFY_COLS);
+ wxString lstOptOperation[3];
+ lstOptOperation[0]=_T("By Dimension (XY)");
+ lstOptOperation[1]=_T("By Spacing (XY)");
+ lstOptOperation[2]=_T("By Spacing (XYZ)");
+ wxRadioBox * radioOpts = new wxRadioBox(dial, -1, _T("Type of Transformation"), wxDefaultPosition, wxSize(370,200), 3 , lstOptOperation, 3, wxRA_SPECIFY_ROWS);
dialSizer->Add( new wxStaticText(dial,-1,_T("The image resolution is not compatible with the ")) , 0, wxGROW );
dialSizer->Add( new wxStaticText(dial,-1,_T("selected Roi file. Do you want to tranform it?")) , 0, wxGROW );
dial->Layout();
dial->ShowModal();
- int _tmpReadFileTypeOfTransformation = -1;
+ _tmpReadFileTypeOfTransformation = -1;
//EED bool transform = false;
if (dial->GetReturnCode() == wxID_OK)
//AD:04-06-09
void wxContourMainFrame::openContours( FILE *pFile, FILE *pFileData, bool staticContour )
{
-
+printf ("EED wxContourMainFrame::openContours Start \n");
char tmp[255];
vtkImageData *image = _images[0];
//nothing to do..
} else if (_tmpReadFileTypeOfTransformation==0){
double transX, transY;
- transX = (double) imageDim[0]/_tmpReadFileImageDim[0];
- transY = (double) imageDim[1]/_tmpReadFileImageDim[1];
- manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
+ transX = (double) imageDim[0]/_tmpReadFileImageDim[0]; // X
+ transY = (double) imageDim[1]/_tmpReadFileImageDim[1]; // Y
+ manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
} else if (_tmpReadFileTypeOfTransformation==1) {
double transX, transY;
- transX = (double) _tmpReadFileImageSpac[0]/imageDim[0];
- transY = (double) _tmpReadFileImageSpac[1]/imageDim[1];
+ transX = (double) _tmpReadFileImageSpac[0]/imageSpac[0]; // X
+ transY = (double) _tmpReadFileImageSpac[1]/imageSpac[1]; // Y
+ manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
+ } else if (_tmpReadFileTypeOfTransformation==2) { // with Z include
+ double transX, transY;
+ transX = (double) _tmpReadFileImageSpac[0]/imageSpac[0]; // X
+ transY = (double) _tmpReadFileImageSpac[1]/imageSpac[1]; // Y
+ instantVector[1]=instantVector[1]*_tmpReadFileImageSpac[2]/imageSpac[2]; // Z
manModelContour->Transform_Ax_Plus_B(transX,0,transY,0);
+ }else {
+ printf ("EED Warnning! wxContourMainFrame::openContours _tmpReadFileTypeOfTransformation not set. \n");
}
fscanf(pFile,"%s",tmp); // TypeView
/* } */
+printf ("EED wxContourMainFrame::openContours END \n");
+
}
void wxContourMainFrame::RefreshInterface()