Atrial fibrillation is the most common cardiac arrhythmia. It is prevalent in the elderly and contributes to mortality in congestive heart failure. Computer models of atrial electrical activation that incorporate realistic structure provide a means of investigating the mechanisms that initiate and maintain reentrant atrial arrhythmia. We are extending computational and experimental techniques that are well established in our laboratory to develop a detailed structure-based model of atrial electrical function. The 3D geometry of the atria and veno-atrial junctions is reconstructed from magnetic resonance images and detailed structure from specific regions of the atria is acquired using a semi-automated extended-volume imaging system. As an example of our approach, we present a reconstruction of the pig right atrial appendage (RAA), including the pectinate muscles (PM) and crista terminalis (CT). The RAA was embedded in wax and the block surface was serially etched, stained and imaged, then removed using an ultramiller to produce a uniformly-spaced image stack. Tissue was segmented and connected voxels were selected using a 3D region-growing algorithm to construct RAA geometry. Electrical activity has been modeled on this structure using the Courtemanche atrial cell activation model. A bidomain formulation was used employing a grid-based finite element solver. The RAA was activated by applying a stimulus (150 microA/mm3, 5 ms) to the 27 grid points at the top of the CT. Despite the complex structure of the PM, RAA activation was relatively uniform.