|Message: GeomNav0002 from DICOM example||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I started modifying the example so it could read not only one DICOM image (or sets of slices) but actually two. My idea was to have two Data.dat files that describe each DICOM image or set of slices. Then I changed the code so that it reads the two different Data.dat files, creates two voxel containers with different parametrizations etc etc.
I use two example slices, a first one with 200k voxels and a second with 75625 voxels. Everyhting goes fine during initialization, two containers are created, the correct numbers of voxels materials dimensions etc, all fine. The g4dcm files are also correct and identical to what is produced when I read one slice per simulation.
Nevertheless, when the first event starts the
G4Material* DicomPhantomParameterisationColour:: ComputeMaterial(const G4int copyNo, G4VPhysicalVolume * physVol, const G4VTouchable *)
is called again (was called also during the initialization) and then I get the error:
George: copyNo = 139776 , physVol->GetName() = Data1.dat , mateName = Air George: copyNo = 139778 , physVol->GetName() = Data1.dat , mateName = LungInhale
-------- EEEE ------- G4Exception-START -------- EEEE ------- *** G4Exception : GeomNav0002 issued by : G4PhantomParameterisation::CheckCopyNo() Copy number is negative or too big! Copy number: 139776 Total number of voxels: 75625 *** Fatal Error In Argument *** core dump *** -------- EEEE -------- G4Exception-END --------- EEEE -------
So it locates a voxel from the first slice, with copy number 139776 out of 200k in total (physVol ok, material also ok), but then for some reason, during the CheckCopyNo() it thinks that this container has a total number of voxels equal to the second DICOM file.
This exeption is thrown from G4PhantomParameterisation::CheckCopyNo() that is called in DicomPhantomParameterisationColour::ComputeMaterial via G4Material* mate = G4PhantomParameterisation::ComputeMaterial( copyNo, physVol, 0 );
I am puzzled. I can't find why the G4Material* DicomPhantomParameterisationColour:: ComputeMaterial(const G4int copyNo, G4VPhysicalVolume * physVol, const G4VTouchable *)
gets the wrong number of voxels!!! I create a different object/pointer to a DicomPhantomParameterisationColour() for each DICOM file, I checked that I pass the correct info via the Set functions in the DicomRegularDetectorConstruction plus that when I cross check with the G4PhantomParameterisation::Get functions, everything seems fine...
If anyone had a similar problem/solution or wants to take a look at my code, I would be grateful.