Message: Re: DICOM.cc: printing out density of each voxel (as a check) question Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: DICOM.cc: printing out density of each voxel (as a check) question 

Forum: Medical Applications
Re: Question DICOM.cc: printing out density of each voxel (as a check) question (Katya Gilbo)
Date: 20 Jul, 2016
From: Pedro Arce <Pedro Arce>

You can get the G4PhantomParameterisation with the code below in a user run action and then use G4Material* G4PhantomParameterisation:: ComputeMaterial(const G4int copyNo, G4VPhysicalVolume *, const G4VTouchable *)

//-----------------------------------------------------------------------
G4PhantomParameterisation* GmRegularParamUtils::GetPhantomParam(G4bool bMustExist)
{
  G4PhantomParameterisation* paramreg = 0;

  G4PhysicalVolumeStore* pvs = G4PhysicalVolumeStore::GetInstance();
  std::vector<G4VPhysicalVolume*>::iterator cite;
  for( cite = pvs->begin(); cite != pvs->end(); cite++ ) {
    //    G4cout << " PV " << (*cite)->GetName() << " " << (*cite)->GetTranslation() << G4endl;
    if( IsPhantomVolume( *cite ) ) {
      const G4PVParameterised* pvparam = static_cast<const G4PVParameterised*>(*cite);
      G4VPVParameterisation* param = pvparam->GetParameterisation();
      //    if( static_cast<const G4PhantomParameterisation*>(param) ){
      //    if( static_cast<const G4PhantomParameterisation*>(param) ){
      //      G4cout << "G4PhantomParameterisation volume found  " << (*cite)->GetName() << G4endl;
      paramreg = static_cast<G4PhantomParameterisation*>(param);
    }
  }

  if( !paramreg && bMustExist ) G4Exception("GmRegularParamUtils::GetPhantomParam",
                                            "Wrong argument",
                                            FatalErrorInArgument,
                                            "No G4PhantomParameterisation found ");

  return paramreg;

}

 Add Message Add Message
to: "Re: DICOM.cc: printing out density of each voxel (as a check) question"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]