X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FOpenImageDialog.cxx;h=4a1038a684d43d68e2e8339f558e346dcda21f50;hb=1b9af7b2c71aa44e2e5adebd2826f26b55d4b209;hp=354c473c91fe6c538d7ec661432193ab9d6f37ae;hpb=acfa60fa044ebc12067c4daba555d18c7d66b2d5;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/OpenImageDialog.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/OpenImageDialog.cxx index 354c473..4a1038a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/OpenImageDialog.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/OpenImageDialog.cxx @@ -14,13 +14,13 @@ namespace creaMaracasVisuKernel{ OpenImageDialog::OpenImageDialog(bool usegimmick) { img = NULL; - + _filename = ""; bool gimmickfound = false; if(usegimmick){ #ifdef WIN32 HINSTANCE gimmickhandle; - gimmickhandle = LoadLibrary(TEXT("creaImageIO2.dll")); + gimmickhandle = LoadLibrary(TEXT("creaImageIO.dll")); std::cout<<"imagehandle "<SetFileName(path.c_str()); reader->Update(); + _filename = path; img = vtkImageData::New(); img->DeepCopy(reader->GetOutput()); + //reader->GetOutput()->Delete(); reader->Delete(); - /*img->SetSpacing(reader->GetOutput()->GetSpacing()); - extint = reader->GetOutput()->GetExtent(); + /*std::cout<<"image reference count "<GetReferenceCount()<GetOutput()->GetSpacing(spacing); + img->SetSpacing(spacing); + reader->GetOutput()->GetExtent(extint); img->SetExtent(extint); - img->SetScalarType(reader->GetOutput()->GetScalarType()); - img->SetDimensions(reader->GetOutput()->GetDimensions()); + img->SetScalarType(reader->GetOutput()->GetScalarType()); img->AllocateScalars(); + std::cout<<"image reference count "<GetReferenceCount()<GetReferenceCount()<