_contourextractdata = NULL;
}
+
+void wxContourMainFrame::changeImage(int id, vtkImageData *img)
+{
+ if ( id<_images.size() ) _images[id]=img;
+ kernelManager->changeImage(id,img);
+ _theViewPanel->changeImage(img);
+// updateInstantImageData();
+
+}
+
void wxContourMainFrame::configure(std::vector<vtkImageData*> imgs)
{
_images = imgs;
{
std::vector<int> inst;
_instantPanel->getInstant(inst);
-
vtkImageData* img = kernelManager->getImageAtInstant(inst);
if(img!=NULL)
{
sizeLstNameThings = lstNameThings.size();
for (i=0 ; i<sizeLstNameThings ; i++)
{
-printf("EED wxContourMainFrame::SetZForAllContours contour=%d \n", i );
manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
sizeLstPoints = manualModel->GetSizeLstPoints();
for (ii=0 ; ii<sizeLstPoints ; ii++)
fprintf(pFileData,"--CreaContour--\n");
fprintf(pFileData,"Version %s\n", "1.0.3" );
fprintf(pFileData,"OnePixelSize %f\n", _onePixelSize);
-
//------------------------------------------------------------------------------------------------------------
-
vtkImageData *image = _images[0];
-
int dimRange[3];
image->GetDimensions(dimRange);
-
fprintf(pFile,"ImageDimensions %d %d %d\n", dimRange[0], dimRange[1], dimRange[2] );
-
double spaRange[3];
image->GetSpacing(spaRange);
-
fprintf(pFile,"ImageSpacing %f %f %f\n", spaRange[0], spaRange[1], spaRange[2] );
-
// Normal Contours
-
lstNameThings = kernelManager->GetLstNameThings();
sizeLstNameThings = lstNameThings.size();
fprintf(pFile,"NumberOfContours %d\n", sizeLstNameThings );
-
//CMRU 03-09-09-----------------------------------------------------------------------------------------------
fprintf(pFileData,"NumberOfContours %d\n", sizeLstNameThings );
//------------------------------------------------------------------------------------------------------------
-
-
// EED 2017-05-30
double spc[3];
spc[0]=1;
spc[1]=1;
- spc[2]=1;
-
+ spc[2]=1;
for (i=0 ; i<sizeLstNameThings ; i++)
{
//CMRU 03-09-09-----------------------------------------------------------------------------------------------
manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(lstNameThings[i]);
-
// EED 2017-05-30
// double sizeInPixel = manualModel ->GetPathSize( );
double sizeInPixel = manualModel ->GetPathSize( spc );
-
double realContourSize = sizeInPixel*_onePixelSize;
manualModel ->SetRealSize(realContourSize);
//------------------------------------------------------------------------------------------------------------
-
//int size= kernelManager->GetLstNameThings().size();
-
kernelManager->SaveThingName( pFile, pFileData, lstNameThings[i] );
_theViewPanel->getSceneManager()->SaveThingName( pFile, lstNameThings[i] );
}// for i
-
//-- Static Contours
-
// fprintf(pFile,"ImageDimensions %d %d %d\n", dimRange[0], dimRange[1], dimRange[2] );
// fprintf(pFile,"ImageSpacing %f %f %f\n", spaRange[0], spaRange[1], spaRange[2] );
-
lstNameThings = kernelManager->GetLstNameThingsStatic();
sizeLstNameThings = lstNameThings.size();
fprintf(pFile,"NumberOfContoursStatic %d\n", sizeLstNameThings );
-
//CMRU 03-09-09-----------------------------------------------------------------------------------------------
fprintf(pFileData,"NumberOfContoursStatic %d\n", sizeLstNameThings );
//------------------------------------------------------------------------------------------------------------
-
for (i=0 ; i<sizeLstNameThings ; i++)
{
kernelManager->SaveThingName( pFile, pFileData, lstNameThings[i] );
void wxContourMainFrame::SegmentationOneSlice( int x, int y, int z, int isovalue, int sampling, int method )
{
-
-//printf("EED wxContourMainFrame::SegmentationOneSlice Start=%d %d\n",sampling,method );
-//printf("EED wxContourMainFrame::SegmentationOneSlice %d %d %d \n",x,y,z );
-
int typeofcontour = 1;
//--Extracting Contour
vtkImageData *imagedata = getImageData();
void wxContourMainFrame::onBrigthnessColorWindowLevel(int colorwindow,int windowlevel)
{
_theViewPanel->onBrigthnessColorWindowLevel(colorwindow, windowlevel);
-
RefreshInterface();
}
void wxContourMainFrame::saveFileWithContoursAutomatique()
{
-printf("EED wxContourMainFrame::saveFileWithContoursAutomatique \n");
std::string filename = kernelManager->getCurrentFileName();
if(filename.compare("")!=0){
saveFileWithContours(filename);
onSave();
}
}
+
void wxContourMainFrame::ShowToolsPanel(bool show)
{
_pannew->Show(show);
}
-
-
void wxContourMainFrame::SetContourGroup(int contourGroup)
{
_contourGroup = contourGroup;
}
-
wxPanel *wxContourMainFrame::getMaskImageViewPanel(wxWindow *parent)
{
-
if (_viewMaskImagePanel==NULL)
{
_contourextractdata = new ContourExtractData(true);