Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.cxx,v $
Language: C++
- Date: $Date: 2008/12/09 15:25:08 $
- Version: $Revision: 1.30 $
+ Date: $Date: 2008/12/15 13:13:49 $
+ Version: $Revision: 1.33 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
-#ifdef _USE_WXWIDGETS_
+#ifdef USE_WXWIDGETS
+#ifdef USE_VTK
#include "bbwxvtkViewer2D.h"
mDefaultImage = vtkImageData::New();
int dim[3];
- dim[0] = dim[1] = 32 ;
+ dim[0] = dim[1] = 256 ;
dim[2] = 2;
mDefaultImage->SetDimensions ( dim );
mDefaultImage->SetSpacing(1,1,1);
mDefaultImage->SetScalarComponentFromFloat(i,j,k,0,0);
for (int i=0;i<dim[0];i++)
- {
- mDefaultImage->SetScalarComponentFromFloat(dim[0]-i-1,i,0,0,255);
- mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
- }
+ {
+ /*
+ mDefaultImage->SetScalarComponentFromFloat(i,0,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(0,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,0,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-1,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(0,i,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(dim[0]-1,i,1,0,255);
+ */
+ mDefaultImage->SetScalarComponentFromFloat(i,i,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,0,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,i,1,0,255);
+ mDefaultImage->SetScalarComponentFromFloat(i,dim[1]-i-1,1,0,255);
+ }
backImageData = mDefaultImage;
imageViewer->SetInput( backImageData );
}
- // This callback is *no more*
- // necessary to get actual processing of the view
- // when window is shown
- void Viewer2D::OnShowWidget()
- {
- }
-
}//namespace bbtk
#endif
+#endif